pandas索引index

pandas索引

html { font-family: sans-serif }
body { margin: 0 }
article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary { display: block }
audio,canvas,progress,video { display: inline-block; vertical-align: baseline }
audio:not([controls]) { display: none; height: 0 }
[hidden],template { display: none }
a { background-color: transparent }
a:active,a:hover { outline: 0 }
abbr[title] { border-bottom: 1px dotted }
b,strong { font-weight: bold }
dfn { font-style: italic }
h1 { font-size: 2em; margin: 0.67em 0 }
mark { background: #ff0; color: #000 }
small { font-size: 80% }
sub,sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline }
sup { top: -0.5em }
sub { bottom: -0.25em }
img { border: 0 }
svg:not(:root) { overflow: hidden }
figure { margin: 1em 40px }
hr { height: 0 }
pre { overflow: auto }
code,kbd,pre,samp { font-family: monospace, monospace; font-size: 1em }
button,input,optgroup,select,textarea { color: inherit; font: inherit; margin: 0 }
button { overflow: visible }
button,select { text-transform: none }
button,html input[type="button"],input[type="reset"],input[type="submit"] { cursor: pointer }
button[disabled],html input[disabled] { cursor: default }
button::-moz-focus-inner,
input::-moz-focus-inner { border: 0; padding: 0 }
input { line-height: normal }
input[type="checkbox"],input[type="radio"] { padding: 0 }
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { height: auto }
input[type="search"] { }
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration { }
fieldset { border: 1px solid #c0c0c0; margin: 0 2px; padding: 0.35em 0.625em 0.75em }
legend { border: 0; padding: 0 }
textarea { overflow: auto }
optgroup { font-weight: bold }
table { border-collapse: collapse; border-spacing: 0 }
td,th { padding: 0 }
.glyphicon { position: relative; top: 1px; display: inline-block; font-family: "Glyphicons Halflings"; font-style: normal; font-weight: normal; line-height: 1 }
.glyphicon-asterisk::before { content: "*" }
.glyphicon-plus::before { content: "+" }
.glyphicon-euro::before,.glyphicon-eur::before { content: "€" }
.glyphicon-minus::before { content: "?" }
.glyphicon-cloud::before { content: "?" }
.glyphicon-envelope::before { content: "?" }
.glyphicon-pencil::before { content: "?" }
.glyphicon-glass::before { content: "" }
.glyphicon-music::before { content: "" }
.glyphicon-search::before { content: "" }
.glyphicon-heart::before { content: "" }
.glyphicon-star::before { content: "" }
.glyphicon-star-empty::before { content: "" }
.glyphicon-user::before { content: "" }
.glyphicon-film::before { content: "" }
.glyphicon-th-large::before { content: "" }
.glyphicon-th::before { content: "" }
.glyphicon-th-list::before { content: "" }
.glyphicon-ok::before { content: "" }
.glyphicon-remove::before { content: "" }
.glyphicon-zoom-in::before { content: "" }
.glyphicon-zoom-out::before { content: "" }
.glyphicon-off::before { content: "" }
.glyphicon-signal::before { content: "" }
.glyphicon-cog::before { content: "" }
.glyphicon-trash::before { content: "" }
.glyphicon-home::before { content: "" }
.glyphicon-file::before { content: "" }
.glyphicon-time::before { content: "" }
.glyphicon-road::before { content: "" }
.glyphicon-download-alt::before { content: "" }
.glyphicon-download::before { content: "" }
.glyphicon-upload::before { content: "" }
.glyphicon-inbox::before { content: "" }
.glyphicon-play-circle::before { content: "" }
.glyphicon-repeat::before { content: "" }
.glyphicon-refresh::before { content: "" }
.glyphicon-list-alt::before { content: "" }
.glyphicon-lock::before { content: "" }
.glyphicon-flag::before { content: "" }
.glyphicon-headphones::before { content: "" }
.glyphicon-volume-off::before { content: "" }
.glyphicon-volume-down::before { content: "" }
.glyphicon-volume-up::before { content: "" }
.glyphicon-qrcode::before { content: "" }
.glyphicon-barcode::before { content: "" }
.glyphicon-tag::before { content: "" }
.glyphicon-tags::before { content: "" }
.glyphicon-book::before { content: "" }
.glyphicon-bookmark::before { content: "" }
.glyphicon-print::before { content: "" }
.glyphicon-camera::before { content: "" }
.glyphicon-font::before { content: "" }
.glyphicon-bold::before { content: "" }
.glyphicon-italic::before { content: "" }
.glyphicon-text-height::before { content: "" }
.glyphicon-text-width::before { content: "" }
.glyphicon-align-left::before { content: "" }
.glyphicon-align-center::before { content: "" }
.glyphicon-align-right::before { content: "" }
.glyphicon-align-justify::before { content: "" }
.glyphicon-list::before { content: "" }
.glyphicon-indent-left::before { content: "" }
.glyphicon-indent-right::before { content: "" }
.glyphicon-facetime-video::before { content: "" }
.glyphicon-picture::before { content: "" }
.glyphicon-map-marker::before { content: "" }
.glyphicon-adjust::before { content: "" }
.glyphicon-tint::before { content: "" }
.glyphicon-edit::before { content: "" }
.glyphicon-share::before { content: "" }
.glyphicon-check::before { content: "" }
.glyphicon-move::before { content: "" }
.glyphicon-step-backward::before { content: "" }
.glyphicon-fast-backward::before { content: "" }
.glyphicon-backward::before { content: "" }
.glyphicon-play::before { content: "" }
.glyphicon-pause::before { content: "" }
.glyphicon-stop::before { content: "" }
.glyphicon-forward::before { content: "" }
.glyphicon-fast-forward::before { content: "" }
.glyphicon-step-forward::before { content: "" }
.glyphicon-eject::before { content: "" }
.glyphicon-chevron-left::before { content: "" }
.glyphicon-chevron-right::before { content: "" }
.glyphicon-plus-sign::before { content: "" }
.glyphicon-minus-sign::before { content: "" }
.glyphicon-remove-sign::before { content: "" }
.glyphicon-ok-sign::before { content: "" }
.glyphicon-question-sign::before { content: "" }
.glyphicon-info-sign::before { content: "" }
.glyphicon-screenshot::before { content: "" }
.glyphicon-remove-circle::before { content: "" }
.glyphicon-ok-circle::before { content: "" }
.glyphicon-ban-circle::before { content: "" }
.glyphicon-arrow-left::before { content: "" }
.glyphicon-arrow-right::before { content: "" }
.glyphicon-arrow-up::before { content: "" }
.glyphicon-arrow-down::before { content: "" }
.glyphicon-share-alt::before { content: "" }
.glyphicon-resize-full::before { content: "" }
.glyphicon-resize-small::before { content: "" }
.glyphicon-exclamation-sign::before { content: "" }
.glyphicon-gift::before { content: "" }
.glyphicon-leaf::before { content: "" }
.glyphicon-fire::before { content: "" }
.glyphicon-eye-open::before { content: "" }
.glyphicon-eye-close::before { content: "" }
.glyphicon-warning-sign::before { content: "" }
.glyphicon-plane::before { content: "" }
.glyphicon-calendar::before { content: "" }
.glyphicon-random::before { content: "" }
.glyphicon-comment::before { content: "" }
.glyphicon-magnet::before { content: "" }
.glyphicon-chevron-up::before { content: "" }
.glyphicon-chevron-down::before { content: "" }
.glyphicon-retweet::before { content: "" }
.glyphicon-shopping-cart::before { content: "" }
.glyphicon-folder-close::before { content: "" }
.glyphicon-folder-open::before { content: "" }
.glyphicon-resize-vertical::before { content: "" }
.glyphicon-resize-horizontal::before { content: "" }
.glyphicon-hdd::before { content: "" }
.glyphicon-bullhorn::before { content: "" }
.glyphicon-bell::before { content: "" }
.glyphicon-certificate::before { content: "" }
.glyphicon-thumbs-up::before { content: "" }
.glyphicon-thumbs-down::before { content: "" }
.glyphicon-hand-right::before { content: "" }
.glyphicon-hand-left::before { content: "" }
.glyphicon-hand-up::before { content: "" }
.glyphicon-hand-down::before { content: "" }
.glyphicon-circle-arrow-right::before { content: "" }
.glyphicon-circle-arrow-left::before { content: "" }
.glyphicon-circle-arrow-up::before { content: "" }
.glyphicon-circle-arrow-down::before { content: "" }
.glyphicon-globe::before { content: "" }
.glyphicon-wrench::before { content: "" }
.glyphicon-tasks::before { content: "" }
.glyphicon-filter::before { content: "" }
.glyphicon-briefcase::before { content: "" }
.glyphicon-fullscreen::before { content: "" }
.glyphicon-dashboard::before { content: "" }
.glyphicon-paperclip::before { content: "" }
.glyphicon-heart-empty::before { content: "" }
.glyphicon-link::before { content: "" }
.glyphicon-phone::before { content: "" }
.glyphicon-pushpin::before { content: "" }
.glyphicon-usd::before { content: "" }
.glyphicon-gbp::before { content: "" }
.glyphicon-sort::before { content: "" }
.glyphicon-sort-by-alphabet::before { content: "" }
.glyphicon-sort-by-alphabet-alt::before { content: "" }
.glyphicon-sort-by-order::before { content: "" }
.glyphicon-sort-by-order-alt::before { content: "" }
.glyphicon-sort-by-attributes::before { content: "" }
.glyphicon-sort-by-attributes-alt::before { content: "" }
.glyphicon-unchecked::before { content: "" }
.glyphicon-expand::before { content: "" }
.glyphicon-collapse-down::before { content: "" }
.glyphicon-collapse-up::before { content: "" }
.glyphicon-log-in::before { content: "" }
.glyphicon-flash::before { content: "" }
.glyphicon-log-out::before { content: "" }
.glyphicon-new-window::before { content: "" }
.glyphicon-record::before { content: "" }
.glyphicon-save::before { content: "" }
.glyphicon-open::before { content: "" }
.glyphicon-saved::before { content: "" }
.glyphicon-import::before { content: "" }
.glyphicon-export::before { content: "" }
.glyphicon-send::before { content: "" }
.glyphicon-floppy-disk::before { content: "" }
.glyphicon-floppy-saved::before { content: "" }
.glyphicon-floppy-remove::before { content: "" }
.glyphicon-floppy-save::before { content: "" }
.glyphicon-floppy-open::before { content: "" }
.glyphicon-credit-card::before { content: "" }
.glyphicon-transfer::before { content: "" }
.glyphicon-cutlery::before { content: "" }
.glyphicon-header::before { content: "" }
.glyphicon-compressed::before { content: "" }
.glyphicon-earphone::before { content: "" }
.glyphicon-phone-alt::before { content: "" }
.glyphicon-tower::before { content: "" }
.glyphicon-stats::before { content: "" }
.glyphicon-sd-video::before { content: "" }
.glyphicon-hd-video::before { content: "" }
.glyphicon-subtitles::before { content: "" }
.glyphicon-sound-stereo::before { content: "" }
.glyphicon-sound-dolby::before { content: "" }
.glyphicon-sound-5-1::before { content: "" }
.glyphicon-sound-6-1::before { content: "" }
.glyphicon-sound-7-1::before { content: "" }
.glyphicon-copyright-mark::before { content: "" }
.glyphicon-registration-mark::before { content: "" }
.glyphicon-cloud-download::before { content: "" }
.glyphicon-cloud-upload::before { content: "" }
.glyphicon-tree-conifer::before { content: "" }
.glyphicon-tree-deciduous::before { content: "" }
.glyphicon-cd::before { content: "" }
.glyphicon-save-file::before { content: "" }
.glyphicon-open-file::before { content: "" }
.glyphicon-level-up::before { content: "" }
.glyphicon-copy::before { content: "" }
.glyphicon-paste::before { content: "" }
.glyphicon-alert::before { content: "" }
.glyphicon-equalizer::before { content: "" }
.glyphicon-king::before { content: "" }
.glyphicon-queen::before { content: "" }
.glyphicon-pawn::before { content: "" }
.glyphicon-bishop::before { content: "" }
.glyphicon-knight::before { content: "" }
.glyphicon-baby-formula::before { content: "" }
.glyphicon-tent::before { content: "?" }
.glyphicon-blackboard::before { content: "" }
.glyphicon-bed::before { content: "" }
.glyphicon-apple::before { content: "?" }
.glyphicon-erase::before { content: "" }
.glyphicon-hourglass::before { content: "?" }
.glyphicon-lamp::before { content: "" }
.glyphicon-duplicate::before { content: "" }
.glyphicon-piggy-bank::before { content: "" }
.glyphicon-scissors::before { content: "" }
.glyphicon-bitcoin::before { content: "" }
.glyphicon-btc::before { content: "" }
.glyphicon-xbt::before { content: "" }
.glyphicon-yen::before { content: "¥" }
.glyphicon-jpy::before { content: "¥" }
.glyphicon-ruble::before { content: "?" }
.glyphicon-rub::before { content: "?" }
.glyphicon-scale::before { content: "" }
.glyphicon-ice-lolly::before { content: "" }
.glyphicon-ice-lolly-tasted::before { content: "" }
.glyphicon-education::before { content: "" }
.glyphicon-option-horizontal::before { content: "" }
.glyphicon-option-vertical::before { content: "" }
.glyphicon-menu-hamburger::before { content: "" }
.glyphicon-modal-window::before { content: "" }
.glyphicon-oil::before { content: "" }
.glyphicon-grain::before { content: "" }
.glyphicon-sunglasses::before { content: "" }
.glyphicon-text-size::before { content: "" }
.glyphicon-text-color::before { content: "" }
.glyphicon-text-background::before { content: "" }
.glyphicon-object-align-top::before { content: "" }
.glyphicon-object-align-bottom::before { content: "" }
.glyphicon-object-align-horizontal::before { content: "" }
.glyphicon-object-align-left::before { content: "" }
.glyphicon-object-align-vertical::before { content: "" }
.glyphicon-object-align-right::before { content: "" }
.glyphicon-triangle-right::before { content: "" }
.glyphicon-triangle-left::before { content: "" }
.glyphicon-triangle-bottom::before { content: "" }
.glyphicon-triangle-top::before { content: "" }
.glyphicon-console::before { content: "" }
.glyphicon-superscript::before { content: "" }
.glyphicon-subscript::before { content: "" }
.glyphicon-menu-left::before { content: "" }
.glyphicon-menu-right::before { content: "" }
.glyphicon-menu-down::before { content: "" }
.glyphicon-menu-up::before { content: "" }
* { }
*::before,*::after { }
html { font-size: 10px }
body { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 13px; line-height: 1.42857143; color: #000; background-color: #fff }
input,button,select,textarea { font-family: inherit; font-size: inherit; line-height: inherit }
a { color: #337ab7; text-decoration: none }
a:hover,a:focus { color: #23527c; text-decoration: underline }
a:focus { outline: 5px auto -webkit-focus-ring-color }
figure { margin: 0 }
img { vertical-align: middle }
.img-responsive,.thumbnail>img,.thumbnail a>img,.carousel-inner>.item>img,.carousel-inner>.item>a>img { display: block; max-width: 100%; height: auto }
.img-rounded { }
.img-thumbnail { padding: 4px; line-height: 1.42857143; background-color: #fff; border: 1px solid #ddd; display: inline-block; max-width: 100%; height: auto }
.img-circle { }
hr { margin-top: 18px; margin-bottom: 18px; border: 0; border-top: 1px solid #eeeeee }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0 }
.sr-only-focusable:active,.sr-only-focusable:focus { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto }
[role="button"] { cursor: pointer }
h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6 { font-family: inherit; font-weight: 500; line-height: 1.1; color: inherit }
h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small { font-weight: normal; line-height: 1; color: #777777 }
h1,.h1,h2,.h2,h3,.h3 { margin-top: 18px; margin-bottom: 9px }
h1 small,.h1 small,h2 small,.h2 small,h3 small,.h3 small,h1 .small,.h1 .small,h2 .small,.h2 .small,h3 .small,.h3 .small { font-size: 65% }
h4,.h4,h5,.h5,h6,.h6 { margin-top: 9px; margin-bottom: 9px }
h4 small,.h4 small,h5 small,.h5 small,h6 small,.h6 small,h4 .small,.h4 .small,h5 .small,.h5 .small,h6 .small,.h6 .small { font-size: 75% }
h1,.h1 { font-size: 33px }
h2,.h2 { font-size: 27px }
h3,.h3 { font-size: 23px }
h4,.h4 { font-size: 17px }
h5,.h5 { font-size: 13px }
h6,.h6 { font-size: 12px }
p { margin: 0 0 9px }
.lead { margin-bottom: 18px; font-size: 14px; font-weight: 300; line-height: 1.4 }
small,.small { font-size: 92% }
mark,.mark { background-color: #fcf8e3; padding: .2em }
.text-left { text-align: left }
.text-right { text-align: right }
.text-center { text-align: center }
.text-justify { text-align: justify }
.text-nowrap { white-space: nowrap }
.text-lowercase { text-transform: lowercase }
.text-uppercase { text-transform: uppercase }
.text-capitalize { text-transform: capitalize }
.text-muted { color: #777777 }
.text-primary { color: #337ab7 }
a.text-primary:hover,a.text-primary:focus { color: #286090 }
.text-success { color: #3c763d }
a.text-success:hover,a.text-success:focus { color: #2b542c }
.text-info { color: #31708f }
a.text-info:hover,a.text-info:focus { color: #245269 }
.text-warning { color: #8a6d3b }
a.text-warning:hover,a.text-warning:focus { color: #66512c }
.text-danger { color: #a94442 }
a.text-danger:hover,a.text-danger:focus { color: #843534 }
.bg-primary { color: #fff; background-color: #337ab7 }
a.bg-primary:hover,a.bg-primary:focus { background-color: #286090 }
.bg-success { background-color: #dff0d8 }
a.bg-success:hover,a.bg-success:focus { background-color: #c1e2b3 }
.bg-info { background-color: #d9edf7 }
a.bg-info:hover,a.bg-info:focus { background-color: #afd9ee }
.bg-warning { background-color: #fcf8e3 }
a.bg-warning:hover,a.bg-warning:focus { background-color: #f7ecb5 }
.bg-danger { background-color: #f2dede }
a.bg-danger:hover,a.bg-danger:focus { background-color: #e4b9b9 }
.page-header { padding-bottom: 8px; margin: 36px 0 18px; border-bottom: 1px solid #eeeeee }
ul,ol { margin-top: 0; margin-bottom: 9px }
ul ul,ol ul,ul ol,ol ol { margin-bottom: 0 }
.list-unstyled { padding-left: 0; list-style: none }
.list-inline { padding-left: 0; list-style: none; margin-left: -5px }
.list-inline>li { display: inline-block; padding-left: 5px; padding-right: 5px }
dl { margin-top: 0; margin-bottom: 18px }
dt,dd { line-height: 1.42857143 }
dt { font-weight: bold }
dd { margin-left: 0 }
abbr[title],abbr[data-original-title] { cursor: help; border-bottom: 1px dotted #777777 }
.initialism { font-size: 90%; text-transform: uppercase }
blockquote { padding: 9px 18px; margin: 0 0 18px; font-size: inherit; border-left: 5px solid #eeeeee }
blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child { margin-bottom: 0 }
blockquote footer,blockquote small,blockquote .small { display: block; font-size: 80%; line-height: 1.42857143; color: #777777 }
blockquote footer::before,blockquote small::before,blockquote .small::before { content: "—?" }
.blockquote-reverse,blockquote.pull-right { padding-right: 15px; padding-left: 0; border-right: 5px solid #eeeeee; border-left: 0; text-align: right }
.blockquote-reverse footer::before,blockquote.pull-right footer::before,.blockquote-reverse small::before,blockquote.pull-right small::before,.blockquote-reverse .small::before,blockquote.pull-right .small::before { content: "" }
.blockquote-reverse footer::after,blockquote.pull-right footer::after,.blockquote-reverse small::after,blockquote.pull-right small::after,.blockquote-reverse .small::after,blockquote.pull-right .small::after { content: "?—" }
address { margin-bottom: 18px; font-style: normal; line-height: 1.42857143 }
code,kbd,pre,samp { font-family: monospace }
code { padding: 2px 4px; font-size: 90%; color: #c7254e; background-color: #f9f2f4 }
kbd { padding: 2px 4px; font-size: 90%; color: #888; background-color: transparent }
kbd kbd { padding: 0; font-size: 100%; font-weight: bold }
pre { display: block; padding: 8.5px; margin: 0 0 9px; font-size: 12px; line-height: 1.42857143; color: #333333; background-color: #f5f5f5; border: 1px solid #ccc }
pre code { padding: 0; font-size: inherit; color: inherit; white-space: pre-wrap; background-color: transparent }
.pre-scrollable { max-height: 340px }
.container { margin-right: auto; margin-left: auto; padding-left: 0px; padding-right: 0px }
.container-fluid { margin-right: auto; margin-left: auto; padding-left: 0px; padding-right: 0px }
.row { margin-left: 0px; margin-right: 0px }
.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12 { position: relative; min-height: 1px; padding-left: 0px; padding-right: 0px }
.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12 { float: left }
.col-xs-12 { width: 100% }
.col-xs-11 { width: 91.66666667% }
.col-xs-10 { width: 83.33333333% }
.col-xs-9 { width: 75% }
.col-xs-8 { width: 66.66666667% }
.col-xs-7 { width: 58.33333333% }
.col-xs-6 { width: 50% }
.col-xs-5 { width: 41.66666667% }
.col-xs-4 { width: 33.33333333% }
.col-xs-3 { width: 25% }
.col-xs-2 { width: 16.66666667% }
.col-xs-1 { width: 8.33333333% }
.col-xs-pull-12 { right: 100% }
.col-xs-pull-11 { right: 91.66666667% }
.col-xs-pull-10 { right: 83.33333333% }
.col-xs-pull-9 { right: 75% }
.col-xs-pull-8 { right: 66.66666667% }
.col-xs-pull-7 { right: 58.33333333% }
.col-xs-pull-6 { right: 50% }
.col-xs-pull-5 { right: 41.66666667% }
.col-xs-pull-4 { right: 33.33333333% }
.col-xs-pull-3 { right: 25% }
.col-xs-pull-2 { right: 16.66666667% }
.col-xs-pull-1 { right: 8.33333333% }
.col-xs-pull-0 { right: auto }
.col-xs-push-12 { left: 100% }
.col-xs-push-11 { left: 91.66666667% }
.col-xs-push-10 { left: 83.33333333% }
.col-xs-push-9 { left: 75% }
.col-xs-push-8 { left: 66.66666667% }
.col-xs-push-7 { left: 58.33333333% }
.col-xs-push-6 { left: 50% }
.col-xs-push-5 { left: 41.66666667% }
.col-xs-push-4 { left: 33.33333333% }
.col-xs-push-3 { left: 25% }
.col-xs-push-2 { left: 16.66666667% }
.col-xs-push-1 { left: 8.33333333% }
.col-xs-push-0 { left: auto }
.col-xs-offset-12 { margin-left: 100% }
.col-xs-offset-11 { margin-left: 91.66666667% }
.col-xs-offset-10 { margin-left: 83.33333333% }
.col-xs-offset-9 { margin-left: 75% }
.col-xs-offset-8 { margin-left: 66.66666667% }
.col-xs-offset-7 { margin-left: 58.33333333% }
.col-xs-offset-6 { margin-left: 50% }
.col-xs-offset-5 { margin-left: 41.66666667% }
.col-xs-offset-4 { margin-left: 33.33333333% }
.col-xs-offset-3 { margin-left: 25% }
.col-xs-offset-2 { margin-left: 16.66666667% }
.col-xs-offset-1 { margin-left: 8.33333333% }
.col-xs-offset-0 { margin-left: 0% }
table { background-color: transparent }
caption { padding-top: 8px; padding-bottom: 8px; color: #777777; text-align: left }
th { text-align: left }
.table { width: 100%; max-width: 100%; margin-bottom: 18px }
.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td { padding: 8px; line-height: 1.42857143; vertical-align: top; border-top: 1px solid #ddd }
.table>thead>tr>th { vertical-align: bottom; border-bottom: 2px solid #ddd }
.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>td { border-top: 0 }
.table>tbody+tbody { border-top: 2px solid #ddd }
.table .table { background-color: #fff }
.table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>td { padding: 5px }
.table-bordered { border: 1px solid #ddd }
.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td { border: 1px solid #ddd }
.table-bordered>thead>tr>th,.table-bordered>thead>tr>td { border-bottom-width: 2px }
.table-striped>tbody>tr:nth-of-type(2n+1) { background-color: #f9f9f9 }
.table-hover>tbody>tr:hover { background-color: #f5f5f5 }
table col[class*="col-"] { position: static; float: none; display: table-column }
table td[class*="col-"],table th[class*="col-"] { position: static; float: none; display: table-cell }
.table>thead>tr>td.active,.table>tbody>tr>td.active,.table>tfoot>tr>td.active,.table>thead>tr>th.active,.table>tbody>tr>th.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>tbody>tr.active>td,.table>tfoot>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr.active>th,.table>tfoot>tr.active>th { background-color: #f5f5f5 }
.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover,.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr.active:hover>th { background-color: #e8e8e8 }
.table>thead>tr>td.success,.table>tbody>tr>td.success,.table>tfoot>tr>td.success,.table>thead>tr>th.success,.table>tbody>tr>th.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>tbody>tr.success>td,.table>tfoot>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr.success>th,.table>tfoot>tr.success>th { background-color: #dff0d8 }
.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr.success:hover>th { background-color: #d0e9c6 }
.table>thead>tr>td.info,.table>tbody>tr>td.info,.table>tfoot>tr>td.info,.table>thead>tr>th.info,.table>tbody>tr>th.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>tbody>tr.info>td,.table>tfoot>tr.info>td,.table>thead>tr.info>th,.table>tbody>tr.info>th,.table>tfoot>tr.info>th { background-color: #d9edf7 }
.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover,.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr.info:hover>th { background-color: #c4e3f3 }
.table>thead>tr>td.warning,.table>tbody>tr>td.warning,.table>tfoot>tr>td.warning,.table>thead>tr>th.warning,.table>tbody>tr>th.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>tbody>tr.warning>td,.table>tfoot>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr.warning>th,.table>tfoot>tr.warning>th { background-color: #fcf8e3 }
.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr.warning:hover>th { background-color: #faf2cc }
.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th { background-color: #f2dede }
.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr.danger:hover>th { background-color: #ebcccc }
.table-responsive { min-height: 0.01% }
fieldset { padding: 0; margin: 0; border: 0; min-width: 0 }
legend { display: block; width: 100%; padding: 0; margin-bottom: 18px; font-size: 19.5px; line-height: inherit; color: #333333; border: 0; border-bottom: 1px solid #e5e5e5 }
label { display: inline-block; max-width: 100%; margin-bottom: 5px; font-weight: bold }
input[type="search"] { }
input[type="radio"],input[type="checkbox"] { margin: 4px 0 0; margin-top: 1px ; line-height: normal }
input[type="file"] { display: block }
input[type="range"] { display: block; width: 100% }
select[multiple],select[size] { height: auto }
input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus { outline: 5px auto -webkit-focus-ring-color }
output { display: block; padding-top: 7px; font-size: 13px; line-height: 1.42857143; color: #555555 }
.form-control { display: block; width: 100%; height: 32px; padding: 6px 12px; font-size: 13px; line-height: 1.42857143; color: #555555; background-color: #fff; background-image: none; border: 1px solid #ccc }
.form-control:focus { border-color: #66afe9; outline: 0 }
.form-control::-moz-placeholder { color: #999; opacity: 1 }
.form-control:-ms-input-placeholder { color: #999 }
.form-control::-webkit-input-placeholder { color: #999 }
.form-control::-ms-expand { border: 0; background-color: transparent }
.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control { background-color: #eeeeee; opacity: 1 }
.form-control[disabled],fieldset[disabled] .form-control { cursor: not-allowed }
textarea.form-control { height: auto }
input[type="search"] { }
.form-group { margin-bottom: 15px }
.radio,.checkbox { position: relative; display: block; margin-top: 10px; margin-bottom: 10px }
.radio label,.checkbox label { min-height: 18px; padding-left: 20px; margin-bottom: 0; font-weight: normal; cursor: pointer }
.radio input[type="radio"],.radio-inline input[type="radio"],.checkbox input[type="checkbox"],.checkbox-inline input[type="checkbox"] { position: absolute; margin-left: -20px; margin-top: 4px }
.radio+.radio,.checkbox+.checkbox { margin-top: -5px }
.radio-inline,.checkbox-inline { position: relative; display: inline-block; padding-left: 20px; margin-bottom: 0; vertical-align: middle; font-weight: normal; cursor: pointer }
.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline { margin-top: 0; margin-left: 10px }
input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"].disabled,input[type="checkbox"].disabled,fieldset[disabled] input[type="radio"],fieldset[disabled] input[type="checkbox"] { cursor: not-allowed }
.radio-inline.disabled,.checkbox-inline.disabled,fieldset[disabled] .radio-inline,fieldset[disabled] .checkbox-inline { cursor: not-allowed }
.radio.disabled label,.checkbox.disabled label,fieldset[disabled] .radio label,fieldset[disabled] .checkbox label { cursor: not-allowed }
.form-control-static { padding-top: 7px; padding-bottom: 7px; margin-bottom: 0; min-height: 31px }
.form-control-static.input-lg,.form-control-static.input-sm { padding-left: 0; padding-right: 0 }
.input-sm { height: 30px; padding: 5px 10px; font-size: 12px; line-height: 1.5 }
select.input-sm { height: 30px; line-height: 30px }
textarea.input-sm,select[multiple].input-sm { height: auto }
.form-group-sm .form-control { height: 30px; padding: 5px 10px; font-size: 12px; line-height: 1.5 }
.form-group-sm select.form-control { height: 30px; line-height: 30px }
.form-group-sm textarea.form-control,.form-group-sm select[multiple].form-control { height: auto }
.form-group-sm .form-control-static { height: 30px; min-height: 30px; padding: 6px 10px; font-size: 12px; line-height: 1.5 }
.input-lg { height: 45px; padding: 10px 16px; font-size: 17px; line-height: 1.3333333 }
select.input-lg { height: 45px; line-height: 45px }
textarea.input-lg,select[multiple].input-lg { height: auto }
.form-group-lg .form-control { height: 45px; padding: 10px 16px; font-size: 17px; line-height: 1.3333333 }
.form-group-lg select.form-control { height: 45px; line-height: 45px }
.form-group-lg textarea.form-control,.form-group-lg select[multiple].form-control { height: auto }
.form-group-lg .form-control-static { height: 45px; min-height: 35px; padding: 11px 16px; font-size: 17px; line-height: 1.3333333 }
.has-feedback { position: relative }
.has-feedback .form-control { padding-right: 40px }
.form-control-feedback { position: absolute; top: 0; right: 0; z-index: 2; display: block; width: 32px; height: 32px; line-height: 32px; text-align: center }
.input-lg+.form-control-feedback,.input-group-lg+.form-control-feedback,.form-group-lg .form-control+.form-control-feedback { width: 45px; height: 45px; line-height: 45px }
.input-sm+.form-control-feedback,.input-group-sm+.form-control-feedback,.form-group-sm .form-control+.form-control-feedback { width: 30px; height: 30px; line-height: 30px }
.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline,.has-success.radio label,.has-success.checkbox label,.has-success.radio-inline label,.has-success.checkbox-inline label { color: #3c763d }
.has-success .form-control { border-color: #3c763d }
.has-success .form-control:focus { border-color: #2b542c }
.has-success .input-group-addon { color: #3c763d; border-color: #3c763d; background-color: #dff0d8 }
.has-success .form-control-feedback { color: #3c763d }
.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline,.has-warning.radio label,.has-warning.checkbox label,.has-warning.radio-inline label,.has-warning.checkbox-inline label { color: #8a6d3b }
.has-warning .form-control { border-color: #8a6d3b }
.has-warning .form-control:focus { border-color: #66512c }
.has-warning .input-group-addon { color: #8a6d3b; border-color: #8a6d3b; background-color: #fcf8e3 }
.has-warning .form-control-feedback { color: #8a6d3b }
.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline,.has-error.radio label,.has-error.checkbox label,.has-error.radio-inline label,.has-error.checkbox-inline label { color: #a94442 }
.has-error .form-control { border-color: #a94442 }
.has-error .form-control:focus { border-color: #843534 }
.has-error .input-group-addon { color: #a94442; border-color: #a94442; background-color: #f2dede }
.has-error .form-control-feedback { color: #a94442 }
.has-feedback label~.form-control-feedback { top: 23px }
.has-feedback label.sr-only~.form-control-feedback { top: 0 }
.help-block { display: block; margin-top: 5px; margin-bottom: 10px; color: #404040 }
.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline { margin-top: 0; margin-bottom: 0; padding-top: 7px }
.form-horizontal .radio,.form-horizontal .checkbox { min-height: 25px }
.form-horizontal .form-group { margin-left: 0px; margin-right: 0px }
.form-horizontal .has-feedback .form-control-feedback { right: 0px }
.btn { display: inline-block; margin-bottom: 0; font-weight: normal; text-align: center; vertical-align: middle; cursor: pointer; background-image: none; border: 1px solid transparent; white-space: nowrap; padding: 6px 12px; font-size: 13px; line-height: 1.42857143 }
.btn:focus,.btn:active:focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn.active.focus { outline: 5px auto -webkit-focus-ring-color }
.btn:hover,.btn:focus,.btn.focus { color: #333; text-decoration: none }
.btn:active,.btn.active { outline: 0; background-image: none }
.btn.disabled,.btn[disabled],fieldset[disabled] .btn { cursor: not-allowed; opacity: 0.65 }
a.btn.disabled,fieldset[disabled] a.btn { }
.btn-default { color: #333; background-color: #fff; border-color: #ccc }
.btn-default:focus,.btn-default.focus { color: #333; background-color: #e6e6e6; border-color: #8c8c8c }
.btn-default:hover { color: #333; background-color: #e6e6e6; border-color: #adadad }
.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default { color: #333; background-color: #e6e6e6; border-color: #adadad }
.btn-default:active:hover,.btn-default.active:hover,.open>.dropdown-toggle.btn-default:hover,.btn-default:active:focus,.btn-default.active:focus,.open>.dropdown-toggle.btn-default:focus,.btn-default:active.focus,.btn-default.active.focus,.open>.dropdown-toggle.btn-default.focus { color: #333; background-color: #d4d4d4; border-color: #8c8c8c }
.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default { background-image: none }
.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled.focus,.btn-default[disabled].focus,fieldset[disabled] .btn-default.focus { background-color: #fff; border-color: #ccc }
.btn-default .badge { color: #fff; background-color: #333 }
.btn-primary { color: #fff; background-color: #337ab7; border-color: #2e6da4 }
.btn-primary:focus,.btn-primary.focus { color: #fff; background-color: #286090; border-color: #122b40 }
.btn-primary:hover { color: #fff; background-color: #286090; border-color: #204d74 }
.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary { color: #fff; background-color: #286090; border-color: #204d74 }
.btn-primary:active:hover,.btn-primary.active:hover,.open>.dropdown-toggle.btn-primary:hover,.btn-primary:active:focus,.btn-primary.active:focus,.open>.dropdown-toggle.btn-primary:focus,.btn-primary:active.focus,.btn-primary.active.focus,.open>.dropdown-toggle.btn-primary.focus { color: #fff; background-color: #204d74; border-color: #122b40 }
.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary { background-image: none }
.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled.focus,.btn-primary[disabled].focus,fieldset[disabled] .btn-primary.focus { background-color: #337ab7; border-color: #2e6da4 }
.btn-primary .badge { color: #337ab7; background-color: #fff }
.btn-success { color: #fff; background-color: #5cb85c; border-color: #4cae4c }
.btn-success:focus,.btn-success.focus { color: #fff; background-color: #449d44; border-color: #255625 }
.btn-success:hover { color: #fff; background-color: #449d44; border-color: #398439 }
.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success { color: #fff; background-color: #449d44; border-color: #398439 }
.btn-success:active:hover,.btn-success.active:hover,.open>.dropdown-toggle.btn-success:hover,.btn-success:active:focus,.btn-success.active:focus,.open>.dropdown-toggle.btn-success:focus,.btn-success:active.focus,.btn-success.active.focus,.open>.dropdown-toggle.btn-success.focus { color: #fff; background-color: #398439; border-color: #255625 }
.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success { background-image: none }
.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled.focus,.btn-success[disabled].focus,fieldset[disabled] .btn-success.focus { background-color: #5cb85c; border-color: #4cae4c }
.btn-success .badge { color: #5cb85c; background-color: #fff }
.btn-info { color: #fff; background-color: #5bc0de; border-color: #46b8da }
.btn-info:focus,.btn-info.focus { color: #fff; background-color: #31b0d5; border-color: #1b6d85 }
.btn-info:hover { color: #fff; background-color: #31b0d5; border-color: #269abc }
.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info { color: #fff; background-color: #31b0d5; border-color: #269abc }
.btn-info:active:hover,.btn-info.active:hover,.open>.dropdown-toggle.btn-info:hover,.btn-info:active:focus,.btn-info.active:focus,.open>.dropdown-toggle.btn-info:focus,.btn-info:active.focus,.btn-info.active.focus,.open>.dropdown-toggle.btn-info.focus { color: #fff; background-color: #269abc; border-color: #1b6d85 }
.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info { background-image: none }
.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled.focus,.btn-info[disabled].focus,fieldset[disabled] .btn-info.focus { background-color: #5bc0de; border-color: #46b8da }
.btn-info .badge { color: #5bc0de; background-color: #fff }
.btn-warning { color: #fff; background-color: #f0ad4e; border-color: #eea236 }
.btn-warning:focus,.btn-warning.focus { color: #fff; background-color: #ec971f; border-color: #985f0d }
.btn-warning:hover { color: #fff; background-color: #ec971f; border-color: #d58512 }
.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning { color: #fff; background-color: #ec971f; border-color: #d58512 }
.btn-warning:active:hover,.btn-warning.active:hover,.open>.dropdown-toggle.btn-warning:hover,.btn-warning:active:focus,.btn-warning.active:focus,.open>.dropdown-toggle.btn-warning:focus,.btn-warning:active.focus,.btn-warning.active.focus,.open>.dropdown-toggle.btn-warning.focus { color: #fff; background-color: #d58512; border-color: #985f0d }
.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning { background-image: none }
.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled.focus,.btn-warning[disabled].focus,fieldset[disabled] .btn-warning.focus { background-color: #f0ad4e; border-color: #eea236 }
.btn-warning .badge { color: #f0ad4e; background-color: #fff }
.btn-danger { color: #fff; background-color: #d9534f; border-color: #d43f3a }
.btn-danger:focus,.btn-danger.focus { color: #fff; background-color: #c9302c; border-color: #761c19 }
.btn-danger:hover { color: #fff; background-color: #c9302c; border-color: #ac2925 }
.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger { color: #fff; background-color: #c9302c; border-color: #ac2925 }
.btn-danger:active:hover,.btn-danger.active:hover,.open>.dropdown-toggle.btn-danger:hover,.btn-danger:active:focus,.btn-danger.active:focus,.open>.dropdown-toggle.btn-danger:focus,.btn-danger:active.focus,.btn-danger.active.focus,.open>.dropdown-toggle.btn-danger.focus { color: #fff; background-color: #ac2925; border-color: #761c19 }
.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger { background-image: none }
.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled.focus,.btn-danger[disabled].focus,fieldset[disabled] .btn-danger.focus { background-color: #d9534f; border-color: #d43f3a }
.btn-danger .badge { color: #d9534f; background-color: #fff }
.btn-link { color: #337ab7; font-weight: normal }
.btn-link,.btn-link:active,.btn-link.active,.btn-link[disabled],fieldset[disabled] .btn-link { background-color: transparent }
.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active { border-color: transparent }
.btn-link:hover,.btn-link:focus { color: #23527c; text-decoration: underline; background-color: transparent }
.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus { color: #777777; text-decoration: none }
.btn-lg,.btn-group-lg>.btn { padding: 10px 16px; font-size: 17px; line-height: 1.3333333 }
.btn-sm,.btn-group-sm>.btn { padding: 5px 10px; font-size: 12px; line-height: 1.5 }
.btn-xs,.btn-group-xs>.btn { padding: 1px 5px; font-size: 12px; line-height: 1.5 }
.btn-block { display: block; width: 100% }
.btn-block+.btn-block { margin-top: 5px }
input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block { width: 100% }
.fade { opacity: 0 }
.fade.in { opacity: 1 }
.collapse { display: none }
.collapse.in { display: block }
tr.collapse.in { display: table-row }
tbody.collapse.in { display: table-row-group }
.collapsing { position: relative; height: 0; overflow: hidden }
.caret { display: inline-block; width: 0; height: 0; margin-left: 2px; vertical-align: middle; border-top: 4px solid ; border-right: 4px solid transparent; border-left: 4px solid transparent }
.dropup,.dropdown { position: relative }
.dropdown-toggle:focus { outline: 0 }
.dropdown-menu { position: absolute; top: 100%; left: 0; z-index: 1000; display: none; float: left; min-width: 160px; padding: 5px 0; margin: 2px 0 0; list-style: none; font-size: 13px; text-align: left; background-color: #fff; border: 1px solid rgba(0, 0, 0, 0.15) }
.dropdown-menu.pull-right { right: 0; left: auto }
.dropdown-menu .divider { height: 1px; margin: 8px 0; overflow: hidden; background-color: #e5e5e5 }
.dropdown-menu>li>a { display: block; padding: 3px 20px; clear: both; font-weight: normal; line-height: 1.42857143; color: #333333; white-space: nowrap }
.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus { text-decoration: none; color: #262626; background-color: #f5f5f5 }
.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus { color: #fff; text-decoration: none; outline: 0; background-color: #337ab7 }
.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus { color: #777777 }
.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus { text-decoration: none; background-color: transparent; background-image: none; cursor: not-allowed }
.open>.dropdown-menu { display: block }
.open>a { outline: 0 }
.dropdown-menu-right { left: auto; right: 0 }
.dropdown-menu-left { left: 0; right: auto }
.dropdown-header { display: block; padding: 3px 20px; font-size: 12px; line-height: 1.42857143; color: #777777; white-space: nowrap }
.dropdown-backdrop { position: fixed; left: 0; right: 0; bottom: 0; top: 0; z-index: 990 }
.pull-right>.dropdown-menu { right: 0; left: auto }
.dropup .caret,.navbar-fixed-bottom .dropdown .caret { border-top: 0; border-bottom: 4px solid ; content: "" }
.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu { top: auto; bottom: 100%; margin-bottom: 2px }
.btn-group,.btn-group-vertical { position: relative; display: inline-block; vertical-align: middle }
.btn-group>.btn,.btn-group-vertical>.btn { position: relative; float: left }
.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active { z-index: 2 }
.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group { margin-left: -1px }
.btn-toolbar { margin-left: -5px }
.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group { float: left }
.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group { margin-left: 5px }
.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { }
.btn-group>.btn:first-child { margin-left: 0 }
.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle) { }
.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child) { }
.btn-group>.btn-group { float: left }
.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn { }
.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle { }
.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child { }
.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle { outline: 0 }
.btn-group>.btn+.dropdown-toggle { padding-left: 8px; padding-right: 8px }
.btn-group>.btn-lg+.dropdown-toggle { padding-left: 12px; padding-right: 12px }
.btn-group.open .dropdown-toggle { }
.btn-group.open .dropdown-toggle.btn-link { }
.btn .caret { margin-left: 0 }
.btn-lg .caret { border-width: 5px 5px 0; border-bottom-width: 0 }
.dropup .btn-lg .caret { border-width: 0 5px 5px }
.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn { display: block; float: none; width: 100%; max-width: 100% }
.btn-group-vertical>.btn-group>.btn { float: none }
.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group { margin-top: -1px; margin-left: 0 }
.btn-group-vertical>.btn:not(:first-child):not(:last-child) { }
.btn-group-vertical>.btn:first-child:not(:last-child) { }
.btn-group-vertical>.btn:last-child:not(:first-child) { }
.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn { }
.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle { }
.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child { }
.btn-group-justified { display: table; width: 100%; table-layout: fixed; border-collapse: separate }
.btn-group-justified>.btn,.btn-group-justified>.btn-group { float: none; display: table-cell; width: 1% }
.btn-group-justified>.btn-group .btn { width: 100% }
.btn-group-justified>.btn-group .dropdown-menu { left: auto }
[data-toggle="buttons"]>.btn input[type="radio"],[data-toggle="buttons"]>.btn-group>.btn input[type="radio"],[data-toggle="buttons"]>.btn input[type="checkbox"],[data-toggle="buttons"]>.btn-group>.btn input[type="checkbox"] { position: absolute; clip: rect(0, 0, 0, 0) }
.input-group { position: relative; display: table; border-collapse: separate }
.input-group[class*="col-"] { float: none; padding-left: 0; padding-right: 0 }
.input-group .form-control { position: relative; z-index: 2; float: left; width: 100%; margin-bottom: 0 }
.input-group .form-control:focus { z-index: 3 }
.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn { height: 45px; padding: 10px 16px; font-size: 17px; line-height: 1.3333333 }
select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn { height: 45px; line-height: 45px }
textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn,select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn { height: auto }
.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn { height: 30px; padding: 5px 10px; font-size: 12px; line-height: 1.5 }
select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn { height: 30px; line-height: 30px }
textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn,select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn { height: auto }
.input-group-addon,.input-group-btn,.input-group .form-control { display: table-cell }
.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child) { }
.input-group-addon,.input-group-btn { width: 1%; white-space: nowrap; vertical-align: middle }
.input-group-addon { padding: 6px 12px; font-size: 13px; font-weight: normal; line-height: 1; color: #555555; text-align: center; background-color: #eeeeee; border: 1px solid #ccc }
.input-group-addon.input-sm { padding: 5px 10px; font-size: 12px }
.input-group-addon.input-lg { padding: 10px 16px; font-size: 17px }
.input-group-addon input[type="radio"],.input-group-addon input[type="checkbox"] { margin-top: 0 }
.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn { }
.input-group-addon:first-child { border-right: 0 }
.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn { }
.input-group-addon:last-child { border-left: 0 }
.input-group-btn { position: relative; font-size: 0; white-space: nowrap }
.input-group-btn>.btn { position: relative }
.input-group-btn>.btn+.btn { margin-left: -1px }
.input-group-btn>.btn:hover,.input-group-btn>.btn:focus,.input-group-btn>.btn:active { z-index: 2 }
.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group { margin-right: -1px }
.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group { z-index: 2; margin-left: -1px }
.nav { margin-bottom: 0; padding-left: 0; list-style: none }
.nav>li { position: relative; display: block }
.nav>li>a { position: relative; display: block; padding: 10px 15px }
.nav>li>a:hover,.nav>li>a:focus { text-decoration: none; background-color: #eeeeee }
.nav>li.disabled>a { color: #777777 }
.nav>li.disabled>a:hover,.nav>li.disabled>a:focus { color: #777777; text-decoration: none; background-color: transparent; cursor: not-allowed }
.nav .open>a,.nav .open>a:hover,.nav .open>a:focus { background-color: #eeeeee; border-color: #337ab7 }
.nav .nav-divider { height: 1px; margin: 8px 0; overflow: hidden; background-color: #e5e5e5 }
.nav>li>a>img { max-width: none }
.nav-tabs { border-bottom: 1px solid #ddd }
.nav-tabs>li { float: left; margin-bottom: -1px }
.nav-tabs>li>a { margin-right: 2px; line-height: 1.42857143; border: 1px solid transparent }
.nav-tabs>li>a:hover { border-color: #eeeeee #eeeeee #ddd }
.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus { color: #555555; background-color: #fff; border: 1px solid #ddd; border-bottom-color: transparent; cursor: default }
.nav-tabs.nav-justified { width: 100%; border-bottom: 0 }
.nav-tabs.nav-justified>li { float: none }
.nav-tabs.nav-justified>li>a { text-align: center; margin-bottom: 5px }
.nav-tabs.nav-justified>.dropdown .dropdown-menu { top: auto; left: auto }
.nav-tabs.nav-justified>li>a { margin-right: 0 }
.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus { border: 1px solid #ddd }
.nav-pills>li { float: left }
.nav-pills>li>a { }
.nav-pills>li+li { margin-left: 2px }
.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus { color: #fff; background-color: #337ab7 }
.nav-stacked>li { float: none }
.nav-stacked>li+li { margin-top: 2px; margin-left: 0 }
.nav-justified { width: 100% }
.nav-justified>li { float: none }
.nav-justified>li>a { text-align: center; margin-bottom: 5px }
.nav-justified>.dropdown .dropdown-menu { top: auto; left: auto }
.nav-tabs-justified { border-bottom: 0 }
.nav-tabs-justified>li>a { margin-right: 0 }
.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus { border: 1px solid #ddd }
.tab-content>.tab-pane { display: none }
.tab-content>.active { display: block }
.nav-tabs .dropdown-menu { margin-top: -1px }
.navbar { position: relative; min-height: 30px; margin-bottom: 18px; border: 1px solid transparent }
.navbar-collapse { padding-right: 0px; padding-left: 0px; border-top: 1px solid transparent }
.navbar-collapse.in { }
.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse { max-height: 340px }
.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse { margin-right: 0px; margin-left: 0px }
.navbar-static-top { z-index: 1000; border-width: 0 0 1px }
.navbar-fixed-top,.navbar-fixed-bottom { position: fixed; right: 0; left: 0; z-index: 1030 }
.navbar-fixed-top { top: 0; border-width: 0 0 1px }
.navbar-fixed-bottom { bottom: 0; margin-bottom: 0; border-width: 1px 0 0 }
.navbar-brand { float: left; padding: 6px 0px; font-size: 17px; line-height: 18px; height: 30px }
.navbar-brand:hover,.navbar-brand:focus { text-decoration: none }
.navbar-brand>img { display: block }
.navbar-toggle { position: relative; float: right; margin-right: 0px; padding: 9px 10px; margin-top: -2px; margin-bottom: -2px; background-color: transparent; background-image: none; border: 1px solid transparent }
.navbar-toggle:focus { outline: 0 }
.navbar-toggle .icon-bar { display: block; width: 22px; height: 2px }
.navbar-toggle .icon-bar+.icon-bar { margin-top: 4px }
.navbar-nav { margin: 3px 0px }
.navbar-nav>li>a { padding-top: 10px; padding-bottom: 10px; line-height: 18px }
.navbar-form { margin-left: 0px; margin-right: 0px; padding: 10px 0px; border-top: 1px solid transparent; border-bottom: 1px solid transparent; margin-top: -1px; margin-bottom: -1px }
.navbar-nav>li>.dropdown-menu { margin-top: 0 }
.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu { margin-bottom: 0 }
.navbar-btn { margin-top: -1px; margin-bottom: -1px }
.navbar-btn.btn-sm { margin-top: 0px; margin-bottom: 0px }
.navbar-btn.btn-xs { margin-top: 4px; margin-bottom: 4px }
.navbar-text { margin-top: 6px; margin-bottom: 6px }
.navbar-default { background-color: #f8f8f8; border-color: #e7e7e7 }
.navbar-default .navbar-brand { color: #777 }
.navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus { color: #5e5e5e; background-color: transparent }
.navbar-default .navbar-text { color: #777 }
.navbar-default .navbar-nav>li>a { color: #777 }
.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus { color: #333; background-color: transparent }
.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus { color: #555; background-color: #e7e7e7 }
.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:hover,.navbar-default .navbar-nav>.disabled>a:focus { color: #ccc; background-color: transparent }
.navbar-default .navbar-toggle { border-color: #ddd }
.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus { background-color: #ddd }
.navbar-default .navbar-toggle .icon-bar { background-color: #888 }
.navbar-default .navbar-collapse,.navbar-default .navbar-form { border-color: #e7e7e7 }
.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:hover,.navbar-default .navbar-nav>.open>a:focus { background-color: #e7e7e7; color: #555 }
.navbar-default .navbar-link { color: #777 }
.navbar-default .navbar-link:hover { color: #333 }
.navbar-default .btn-link { color: #777 }
.navbar-default .btn-link:hover,.navbar-default .btn-link:focus { color: #333 }
.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:hover,.navbar-default .btn-link[disabled]:focus,fieldset[disabled] .navbar-default .btn-link:focus { color: #ccc }
.navbar-inverse { background-color: #222; border-color: #080808 }
.navbar-inverse .navbar-brand { color: #9d9d9d }
.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus { color: #fff; background-color: transparent }
.navbar-inverse .navbar-text { color: #9d9d9d }
.navbar-inverse .navbar-nav>li>a { color: #9d9d9d }
.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus { color: #fff; background-color: transparent }
.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus { color: #fff; background-color: #080808 }
.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus { color: #444; background-color: transparent }
.navbar-inverse .navbar-toggle { border-color: #333 }
.navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus { background-color: #333 }
.navbar-inverse .navbar-toggle .icon-bar { background-color: #fff }
.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form { border-color: #101010 }
.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus { background-color: #080808; color: #fff }
.navbar-inverse .navbar-link { color: #9d9d9d }
.navbar-inverse .navbar-link:hover { color: #fff }
.navbar-inverse .btn-link { color: #9d9d9d }
.navbar-inverse .btn-link:hover,.navbar-inverse .btn-link:focus { color: #fff }
.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:hover,.navbar-inverse .btn-link[disabled]:focus,fieldset[disabled] .navbar-inverse .btn-link:focus { color: #444 }
.breadcrumb { padding: 8px 15px; margin-bottom: 18px; list-style: none; background-color: #f5f5f5 }
.breadcrumb>li { display: inline-block }
.breadcrumb>li+li::before { content: "/?"; padding: 0 5px; color: #5e5e5e }
.breadcrumb>.active { color: #777777 }
.pagination { display: inline-block; padding-left: 0; margin: 18px 0 }
.pagination>li { display: inline }
.pagination>li>a,.pagination>li>span { position: relative; float: left; padding: 6px 12px; line-height: 1.42857143; text-decoration: none; color: #337ab7; background-color: #fff; border: 1px solid #ddd; margin-left: -1px }
.pagination>li:first-child>a,.pagination>li:first-child>span { margin-left: 0 }
.pagination>li:last-child>a,.pagination>li:last-child>span { }
.pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus { z-index: 2; color: #23527c; background-color: #eeeeee; border-color: #ddd }
.pagination>.active>a,.pagination>.active>span,.pagination>.active>a:hover,.pagination>.active>span:hover,.pagination>.active>a:focus,.pagination>.active>span:focus { z-index: 3; color: #fff; background-color: #337ab7; border-color: #337ab7; cursor: default }
.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus { color: #777777; background-color: #fff; border-color: #ddd; cursor: not-allowed }
.pagination-lg>li>a,.pagination-lg>li>span { padding: 10px 16px; font-size: 17px; line-height: 1.3333333 }
.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span { }
.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span { }
.pagination-sm>li>a,.pagination-sm>li>span { padding: 5px 10px; font-size: 12px; line-height: 1.5 }
.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span { }
.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span { }
.pager { padding-left: 0; margin: 18px 0; list-style: none; text-align: center }
.pager li { display: inline }
.pager li>a,.pager li>span { display: inline-block; padding: 5px 14px; background-color: #fff; border: 1px solid #ddd }
.pager li>a:hover,.pager li>a:focus { text-decoration: none; background-color: #eeeeee }
.pager .next>a,.pager .next>span { float: right }
.pager .previous>a,.pager .previous>span { float: left }
.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span { color: #777777; background-color: #fff; cursor: not-allowed }
.label { display: inline; padding: .2em .6em .3em; font-size: 75%; font-weight: bold; line-height: 1; color: #fff; text-align: center; white-space: nowrap; vertical-align: baseline }
a.label:hover,a.label:focus { color: #fff; text-decoration: none; cursor: pointer }
.label:empty { display: none }
.btn .label { position: relative; top: -1px }
.label-default { background-color: #777777 }
.label-default[href]:hover,.label-default[href]:focus { background-color: #5e5e5e }
.label-primary { background-color: #337ab7 }
.label-primary[href]:hover,.label-primary[href]:focus { background-color: #286090 }
.label-success { background-color: #5cb85c }
.label-success[href]:hover,.label-success[href]:focus { background-color: #449d44 }
.label-info { background-color: #5bc0de }
.label-info[href]:hover,.label-info[href]:focus { background-color: #31b0d5 }
.label-warning { background-color: #f0ad4e }
.label-warning[href]:hover,.label-warning[href]:focus { background-color: #ec971f }
.label-danger { background-color: #d9534f }
.label-danger[href]:hover,.label-danger[href]:focus { background-color: #c9302c }
.badge { display: inline-block; min-width: 10px; padding: 3px 7px; font-size: 12px; font-weight: bold; color: #fff; line-height: 1; vertical-align: middle; white-space: nowrap; text-align: center; background-color: #777777 }
.badge:empty { display: none }
.btn .badge { position: relative; top: -1px }
.btn-xs .badge,.btn-group-xs>.btn .badge { top: 0; padding: 1px 5px }
a.badge:hover,a.badge:focus { color: #fff; text-decoration: none; cursor: pointer }
.list-group-item.active>.badge,.nav-pills>.active>a>.badge { color: #337ab7; background-color: #fff }
.list-group-item>.badge { float: right }
.list-group-item>.badge+.badge { margin-right: 5px }
.nav-pills>li>a>.badge { margin-left: 3px }
.jumbotron { padding-top: 30px; padding-bottom: 30px; margin-bottom: 30px; color: inherit; background-color: #eeeeee }
.jumbotron h1,.jumbotron .h1 { color: inherit }
.jumbotron p { margin-bottom: 15px; font-size: 20px; font-weight: 200 }
.jumbotron>hr { border-top-color: #d5d5d5 }
.container .jumbotron,.container-fluid .jumbotron { padding-left: 0px; padding-right: 0px }
.jumbotron .container { max-width: 100% }
.thumbnail { display: block; padding: 4px; margin-bottom: 18px; line-height: 1.42857143; background-color: #fff; border: 1px solid #ddd }
.thumbnail>img,.thumbnail a>img { margin-left: auto; margin-right: auto }
a.thumbnail:hover,a.thumbnail:focus,a.thumbnail.active { border-color: #337ab7 }
.thumbnail .caption { padding: 9px; color: #000 }
.alert { padding: 15px; margin-bottom: 18px; border: 1px solid transparent }
.alert h4 { margin-top: 0; color: inherit }
.alert .alert-link { font-weight: bold }
.alert>p,.alert>ul { margin-bottom: 0 }
.alert>p+p { margin-top: 5px }
.alert-dismissable,.alert-dismissible { padding-right: 35px }
.alert-dismissable .close,.alert-dismissible .close { position: relative; top: -2px; right: -21px; color: inherit }
.alert-success { background-color: #dff0d8; border-color: #d6e9c6; color: #3c763d }
.alert-success hr { border-top-color: #c9e2b3 }
.alert-success .alert-link { color: #2b542c }
.alert-info { background-color: #d9edf7; border-color: #bce8f1; color: #31708f }
.alert-info hr { border-top-color: #a6e1ec }
.alert-info .alert-link { color: #245269 }
.alert-warning { background-color: #fcf8e3; border-color: #faebcc; color: #8a6d3b }
.alert-warning hr { border-top-color: #f7e1b5 }
.alert-warning .alert-link { color: #66512c }
.alert-danger { background-color: #f2dede; border-color: #ebccd1; color: #a94442 }
.alert-danger hr { border-top-color: #e4b9c0 }
.alert-danger .alert-link { color: #843534 }
.progress { overflow: hidden; height: 18px; margin-bottom: 18px; background-color: #f5f5f5 }
.progress-bar { float: left; width: 0%; height: 100%; font-size: 12px; line-height: 18px; color: #fff; text-align: center; background-color: #337ab7 }
.progress-striped .progress-bar,.progress-bar-striped { background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent) }
.progress.active .progress-bar,.progress-bar.active { }
.progress-bar-success { background-color: #5cb85c }
.progress-striped .progress-bar-success { background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent) }
.progress-bar-info { background-color: #5bc0de }
.progress-striped .progress-bar-info { background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent) }
.progress-bar-warning { background-color: #f0ad4e }
.progress-striped .progress-bar-warning { background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent) }
.progress-bar-danger { background-color: #d9534f }
.progress-striped .progress-bar-danger { background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent) }
.media { margin-top: 15px }
.media:first-child { margin-top: 0 }
.media,.media-body { overflow: hidden }
.media-body { width: 10000px }
.media-object { display: block }
.media-object.img-thumbnail { max-width: none }
.media-right,.media>.pull-right { padding-left: 10px }
.media-left,.media>.pull-left { padding-right: 10px }
.media-left,.media-right,.media-body { display: table-cell; vertical-align: top }
.media-middle { vertical-align: middle }
.media-bottom { vertical-align: bottom }
.media-heading { margin-top: 0; margin-bottom: 5px }
.media-list { padding-left: 0; list-style: none }
.list-group { margin-bottom: 20px; padding-left: 0 }
.list-group-item { position: relative; display: block; padding: 10px 15px; margin-bottom: -1px; background-color: #fff; border: 1px solid #ddd }
.list-group-item:first-child { }
.list-group-item:last-child { margin-bottom: 0 }
a.list-group-item,button.list-group-item { color: #555 }
a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading { color: #333 }
a.list-group-item:hover,button.list-group-item:hover,a.list-group-item:focus,button.list-group-item:focus { text-decoration: none; color: #555; background-color: #f5f5f5 }
button.list-group-item { width: 100%; text-align: left }
.list-group-item.disabled,.list-group-item.disabled:hover,.list-group-item.disabled:focus { background-color: #eeeeee; color: #777777; cursor: not-allowed }
.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading { color: inherit }
.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text { color: #777777 }
.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus { z-index: 2; color: #fff; background-color: #337ab7; border-color: #337ab7 }
.list-group-item.active .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>.small { color: inherit }
.list-group-item.active .list-group-item-text,.list-group-item.active:hover .list-group-item-text,.list-group-item.active:focus .list-group-item-text { color: #c7ddef }
.list-group-item-success { color: #3c763d; background-color: #dff0d8 }
a.list-group-item-success,button.list-group-item-success { color: #3c763d }
a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading { color: inherit }
a.list-group-item-success:hover,button.list-group-item-success:hover,a.list-group-item-success:focus,button.list-group-item-success:focus { color: #3c763d; background-color: #d0e9c6 }
a.list-group-item-success.active,button.list-group-item-success.active,a.list-group-item-success.active:hover,button.list-group-item-success.active:hover,a.list-group-item-success.active:focus,button.list-group-item-success.active:focus { color: #fff; background-color: #3c763d; border-color: #3c763d }
.list-group-item-info { color: #31708f; background-color: #d9edf7 }
a.list-group-item-info,button.list-group-item-info { color: #31708f }
a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading { color: inherit }
a.list-group-item-info:hover,button.list-group-item-info:hover,a.list-group-item-info:focus,button.list-group-item-info:focus { color: #31708f; background-color: #c4e3f3 }
a.list-group-item-info.active,button.list-group-item-info.active,a.list-group-item-info.active:hover,button.list-group-item-info.active:hover,a.list-group-item-info.active:focus,button.list-group-item-info.active:focus { color: #fff; background-color: #31708f; border-color: #31708f }
.list-group-item-warning { color: #8a6d3b; background-color: #fcf8e3 }
a.list-group-item-warning,button.list-group-item-warning { color: #8a6d3b }
a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading { color: inherit }
a.list-group-item-warning:hover,button.list-group-item-warning:hover,a.list-group-item-warning:focus,button.list-group-item-warning:focus { color: #8a6d3b; background-color: #faf2cc }
a.list-group-item-warning.active,button.list-group-item-warning.active,a.list-group-item-warning.active:hover,button.list-group-item-warning.active:hover,a.list-group-item-warning.active:focus,button.list-group-item-warning.active:focus { color: #fff; background-color: #8a6d3b; border-color: #8a6d3b }
.list-group-item-danger { color: #a94442; background-color: #f2dede }
a.list-group-item-danger,button.list-group-item-danger { color: #a94442 }
a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading { color: inherit }
a.list-group-item-danger:hover,button.list-group-item-danger:hover,a.list-group-item-danger:focus,button.list-group-item-danger:focus { color: #a94442; background-color: #ebcccc }
a.list-group-item-danger.active,button.list-group-item-danger.active,a.list-group-item-danger.active:hover,button.list-group-item-danger.active:hover,a.list-group-item-danger.active:focus,button.list-group-item-danger.active:focus { color: #fff; background-color: #a94442; border-color: #a94442 }
.list-group-item-heading { margin-top: 0; margin-bottom: 5px }
.list-group-item-text { margin-bottom: 0; line-height: 1.3 }
.panel { margin-bottom: 18px; background-color: #fff; border: 1px solid transparent }
.panel-body { padding: 15px }
.panel-heading { padding: 10px 15px; border-bottom: 1px solid transparent }
.panel-heading>.dropdown .dropdown-toggle { color: inherit }
.panel-title { margin-top: 0; margin-bottom: 0; font-size: 15px; color: inherit }
.panel-title>a,.panel-title>small,.panel-title>.small,.panel-title>small>a,.panel-title>.small>a { color: inherit }
.panel-footer { padding: 10px 15px; background-color: #f5f5f5; border-top: 1px solid #ddd }
.panel>.list-group,.panel>.panel-collapse>.list-group { margin-bottom: 0 }
.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item { border-width: 1px 0 }
.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child { border-top: 0 }
.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child { border-bottom: 0 }
.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child { }
.panel-heading+.list-group .list-group-item:first-child { border-top-width: 0 }
.list-group+.panel-footer { border-top-width: 0 }
.panel>.table,.panel>.table-responsive>.table,.panel>.panel-collapse>.table { margin-bottom: 0 }
.panel>.table caption,.panel>.table-responsive>.table caption,.panel>.panel-collapse>.table caption { padding-left: 15px; padding-right: 15px }
.panel>.table:first-child,.panel>.table-responsive:first-child>.table:first-child { }
.panel>.table:first-child>thead:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child { }
.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child { }
.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child { }
.panel>.table:last-child,.panel>.table-responsive:last-child>.table:last-child { }
.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child { }
.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child { }
.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child { }
.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body { border-top: 1px solid #ddd }
.panel>.table>tbody:first-child>tr:first-child th,.panel>.table>tbody:first-child>tr:first-child td { border-top: 0 }
.panel>.table-bordered,.panel>.table-responsive>.table-bordered { border: 0 }
.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child { border-left: 0 }
.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child { border-right: 0 }
.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th { border-bottom: 0 }
.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th { border-bottom: 0 }
.panel>.table-responsive { border: 0; margin-bottom: 0 }
.panel-group { margin-bottom: 18px }
.panel-group .panel { margin-bottom: 0 }
.panel-group .panel+.panel { margin-top: 5px }
.panel-group .panel-heading { border-bottom: 0 }
.panel-group .panel-heading+.panel-collapse>.panel-body,.panel-group .panel-heading+.panel-collapse>.list-group { border-top: 1px solid #ddd }
.panel-group .panel-footer { border-top: 0 }
.panel-group .panel-footer+.panel-collapse .panel-body { border-bottom: 1px solid #ddd }
.panel-default { border-color: #ddd }
.panel-default>.panel-heading { color: #333333; background-color: #f5f5f5; border-color: #ddd }
.panel-default>.panel-heading+.panel-collapse>.panel-body { border-top-color: #ddd }
.panel-default>.panel-heading .badge { color: #f5f5f5; background-color: #333333 }
.panel-default>.panel-footer+.panel-collapse>.panel-body { border-bottom-color: #ddd }
.panel-primary { border-color: #337ab7 }
.panel-primary>.panel-heading { color: #fff; background-color: #337ab7; border-color: #337ab7 }
.panel-primary>.panel-heading+.panel-collapse>.panel-body { border-top-color: #337ab7 }
.panel-primary>.panel-heading .badge { color: #337ab7; background-color: #fff }
.panel-primary>.panel-footer+.panel-collapse>.panel-body { border-bottom-color: #337ab7 }
.panel-success { border-color: #d6e9c6 }
.panel-success>.panel-heading { color: #3c763d; background-color: #dff0d8; border-color: #d6e9c6 }
.panel-success>.panel-heading+.panel-collapse>.panel-body { border-top-color: #d6e9c6 }
.panel-success>.panel-heading .badge { color: #dff0d8; background-color: #3c763d }
.panel-success>.panel-footer+.panel-collapse>.panel-body { border-bottom-color: #d6e9c6 }
.panel-info { border-color: #bce8f1 }
.panel-info>.panel-heading { color: #31708f; background-color: #d9edf7; border-color: #bce8f1 }
.panel-info>.panel-heading+.panel-collapse>.panel-body { border-top-color: #bce8f1 }
.panel-info>.panel-heading .badge { color: #d9edf7; background-color: #31708f }
.panel-info>.panel-footer+.panel-collapse>.panel-body { border-bottom-color: #bce8f1 }
.panel-warning { border-color: #faebcc }
.panel-warning>.panel-heading { color: #8a6d3b; background-color: #fcf8e3; border-color: #faebcc }
.panel-warning>.panel-heading+.panel-collapse>.panel-body { border-top-color: #faebcc }
.panel-warning>.panel-heading .badge { color: #fcf8e3; background-color: #8a6d3b }
.panel-warning>.panel-footer+.panel-collapse>.panel-body { border-bottom-color: #faebcc }
.panel-danger { border-color: #ebccd1 }
.panel-danger>.panel-heading { color: #a94442; background-color: #f2dede; border-color: #ebccd1 }
.panel-danger>.panel-heading+.panel-collapse>.panel-body { border-top-color: #ebccd1 }
.panel-danger>.panel-heading .badge { color: #f2dede; background-color: #a94442 }
.panel-danger>.panel-footer+.panel-collapse>.panel-body { border-bottom-color: #ebccd1 }
.embed-responsive { position: relative; display: block; height: 0; padding: 0; overflow: hidden }
.embed-responsive .embed-responsive-item,.embed-responsive iframe,.embed-responsive embed,.embed-responsive object,.embed-responsive video { position: absolute; top: 0; left: 0; bottom: 0; height: 100%; width: 100%; border: 0 }
.embed-responsive-16by9 { padding-bottom: 56.25% }
.embed-responsive-4by3 { padding-bottom: 75% }
.well { min-height: 20px; padding: 19px; margin-bottom: 20px; background-color: #f5f5f5; border: 1px solid #e3e3e3 }
.well blockquote { border-color: rgba(0, 0, 0, 0.15) }
.well-lg { padding: 24px }
.well-sm { padding: 9px }
.close { float: right; font-size: 19.5px; font-weight: bold; line-height: 1; color: #000; opacity: 0.2 }
.close:hover,.close:focus { color: #000; text-decoration: none; cursor: pointer; opacity: 0.5 }
button.close { padding: 0; cursor: pointer; background: transparent; border: 0 }
.modal-open { overflow: hidden }
.modal { display: none; overflow: hidden; position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1050; outline: 0 }
.modal.fade .modal-dialog { }
.modal.in .modal-dialog { }
.modal-open .modal { }
.modal-dialog { position: relative; width: auto; margin: 10px }
.modal-content { position: relative; background-color: #fff; border: 1px solid rgba(0, 0, 0, 0.2); outline: 0 }
.modal-backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1040; background-color: #000 }
.modal-backdrop.fade { opacity: 0 }
.modal-backdrop.in { opacity: 0.5 }
.modal-header { padding: 15px; border-bottom: 1px solid #e5e5e5 }
.modal-header .close { margin-top: -2px }
.modal-title { margin: 0; line-height: 1.42857143 }
.modal-body { position: relative; padding: 15px }
.modal-footer { padding: 15px; text-align: right; border-top: 1px solid #e5e5e5 }
.modal-footer .btn+.btn { margin-left: 5px; margin-bottom: 0 }
.modal-footer .btn-group .btn+.btn { margin-left: -1px }
.modal-footer .btn-block+.btn-block { margin-left: 0 }
.modal-scrollbar-measure { position: absolute; top: -9999px; width: 50px; height: 50px; overflow: scroll }
.tooltip { position: absolute; z-index: 1070; display: block; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-style: normal; font-weight: normal; letter-spacing: normal; line-height: 1.42857143; text-align: start; text-decoration: none; text-transform: none; white-space: normal; word-spacing: normal; font-size: 12px; opacity: 0 }
.tooltip.in { opacity: 0.9 }
.tooltip.top { margin-top: -3px; padding: 5px 0 }
.tooltip.right { margin-left: 3px; padding: 0 5px }
.tooltip.bottom { margin-top: 3px; padding: 5px 0 }
.tooltip.left { margin-left: -3px; padding: 0 5px }
.tooltip-inner { max-width: 200px; padding: 3px 8px; color: #fff; text-align: center; background-color: #000 }
.tooltip-arrow { position: absolute; width: 0; height: 0; border-color: transparent; border-style: solid }
.tooltip.top .tooltip-arrow { bottom: 0; left: 50%; margin-left: -5px; border-width: 5px 5px 0; border-top-color: #000 }
.tooltip.top-left .tooltip-arrow { bottom: 0; right: 5px; margin-bottom: -5px; border-width: 5px 5px 0; border-top-color: #000 }
.tooltip.top-right .tooltip-arrow { bottom: 0; left: 5px; margin-bottom: -5px; border-width: 5px 5px 0; border-top-color: #000 }
.tooltip.right .tooltip-arrow { top: 50%; left: 0; margin-top: -5px; border-width: 5px 5px 5px 0; border-right-color: #000 }
.tooltip.left .tooltip-arrow { top: 50%; right: 0; margin-top: -5px; border-width: 5px 0 5px 5px; border-left-color: #000 }
.tooltip.bottom .tooltip-arrow { top: 0; left: 50%; margin-left: -5px; border-width: 0 5px 5px; border-bottom-color: #000 }
.tooltip.bottom-left .tooltip-arrow { top: 0; right: 5px; margin-top: -5px; border-width: 0 5px 5px; border-bottom-color: #000 }
.tooltip.bottom-right .tooltip-arrow { top: 0; left: 5px; margin-top: -5px; border-width: 0 5px 5px; border-bottom-color: #000 }
.popover { position: absolute; top: 0; left: 0; z-index: 1060; display: none; max-width: 276px; padding: 1px; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-style: normal; font-weight: normal; letter-spacing: normal; line-height: 1.42857143; text-align: start; text-decoration: none; text-transform: none; white-space: normal; word-spacing: normal; font-size: 13px; background-color: #fff; border: 1px solid rgba(0, 0, 0, 0.2) }
.popover.top { margin-top: -10px }
.popover.right { margin-left: 10px }
.popover.bottom { margin-top: 10px }
.popover.left { margin-left: -10px }
.popover-title { margin: 0; padding: 8px 14px; font-size: 13px; background-color: #f7f7f7; border-bottom: 1px solid #ebebeb }
.popover-content { padding: 9px 14px }
.popover>.arrow,.popover>.arrow::after { position: absolute; display: block; width: 0; height: 0; border-color: transparent; border-style: solid }
.popover>.arrow { border-width: 11px }
.popover>.arrow::after { border-width: 10px; content: "" }
.popover.top>.arrow { left: 50%; margin-left: -11px; border-bottom-width: 0; border-top-color: rgba(0, 0, 0, 0.25); bottom: -11px }
.popover.top>.arrow::after { content: " "; bottom: 1px; margin-left: -10px; border-bottom-width: 0; border-top-color: #fff }
.popover.right>.arrow { top: 50%; left: -11px; margin-top: -11px; border-left-width: 0; border-right-color: rgba(0, 0, 0, 0.25) }
.popover.right>.arrow::after { content: " "; left: 1px; bottom: -10px; border-left-width: 0; border-right-color: #fff }
.popover.bottom>.arrow { left: 50%; margin-left: -11px; border-top-width: 0; border-bottom-color: rgba(0, 0, 0, 0.25); top: -11px }
.popover.bottom>.arrow::after { content: " "; top: 1px; margin-left: -10px; border-top-width: 0; border-bottom-color: #fff }
.popover.left>.arrow { top: 50%; right: -11px; margin-top: -11px; border-right-width: 0; border-left-color: rgba(0, 0, 0, 0.25) }
.popover.left>.arrow::after { content: " "; right: 1px; border-right-width: 0; border-left-color: #fff; bottom: -10px }
.carousel { position: relative }
.carousel-inner { position: relative; overflow: hidden; width: 100% }
.carousel-inner>.item { display: none; position: relative }
.carousel-inner>.item>img,.carousel-inner>.item>a>img { line-height: 1 }
.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev { display: block }
.carousel-inner>.active { left: 0 }
.carousel-inner>.next,.carousel-inner>.prev { position: absolute; top: 0; width: 100% }
.carousel-inner>.next { left: 100% }
.carousel-inner>.prev { left: -100% }
.carousel-inner>.next.left,.carousel-inner>.prev.right { left: 0 }
.carousel-inner>.active.left { left: -100% }
.carousel-inner>.active.right { left: 100% }
.carousel-control { position: absolute; top: 0; left: 0; bottom: 0; width: 15%; opacity: 0.5; font-size: 20px; color: #fff; text-align: center; background-color: rgba(0, 0, 0, 0) }
.carousel-control.left { background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%); background-repeat: repeat-x }
.carousel-control.right { left: auto; right: 0; background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%); background-repeat: repeat-x }
.carousel-control:hover,.carousel-control:focus { outline: 0; color: #fff; text-decoration: none; opacity: 0.9 }
.carousel-control .icon-prev,.carousel-control .icon-next,.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right { position: absolute; top: 50%; margin-top: -10px; z-index: 5; display: inline-block }
.carousel-control .icon-prev,.carousel-control .glyphicon-chevron-left { left: 50%; margin-left: -10px }
.carousel-control .icon-next,.carousel-control .glyphicon-chevron-right { right: 50%; margin-right: -10px }
.carousel-control .icon-prev,.carousel-control .icon-next { width: 20px; height: 20px; line-height: 1; font-family: serif }
.carousel-control .icon-prev::before { content: "?" }
.carousel-control .icon-next::before { content: "?" }
.carousel-indicators { position: absolute; bottom: 10px; left: 50%; z-index: 15; width: 60%; margin-left: -30%; padding-left: 0; list-style: none; text-align: center }
.carousel-indicators li { display: inline-block; width: 10px; height: 10px; margin: 1px; text-indent: -999px; border: 1px solid #fff; cursor: pointer; background-color: rgba(0, 0, 0, 0) }
.carousel-indicators .active { margin: 0; width: 12px; height: 12px; background-color: #fff }
.carousel-caption { position: absolute; left: 15%; right: 15%; bottom: 20px; z-index: 10; padding-top: 20px; padding-bottom: 20px; color: #fff; text-align: center }
.carousel-caption .btn { }
.clearfix::before,.clearfix::after,.dl-horizontal dd::before,.dl-horizontal dd::after,.container::before,.container::after,.container-fluid::before,.container-fluid::after,.row::before,.row::after,.form-horizontal .form-group::before,.form-horizontal .form-group::after,.btn-toolbar::before,.btn-toolbar::after,.btn-group-vertical>.btn-group::before,.btn-group-vertical>.btn-group::after,.nav::before,.nav::after,.navbar::before,.navbar::after,.navbar-header::before,.navbar-header::after,.navbar-collapse::before,.navbar-collapse::after,.pager::before,.pager::after,.panel-body::before,.panel-body::after,.modal-header::before,.modal-header::after,.modal-footer::before,.modal-footer::after,.item_buttons::before,.item_buttons::after { content: " "; display: table }
.clearfix::after,.dl-horizontal dd::after,.container::after,.container-fluid::after,.row::after,.form-horizontal .form-group::after,.btn-toolbar::after,.btn-group-vertical>.btn-group::after,.nav::after,.navbar::after,.navbar-header::after,.navbar-collapse::after,.pager::after,.panel-body::after,.modal-header::after,.modal-footer::after,.item_buttons::after { clear: both }
.center-block { display: block; margin-left: auto; margin-right: auto }
.pull-right { float: right !important }
.pull-left { float: left !important }
.hide { display: none !important }
.show { display: block !important }
.invisible { visibility: hidden }
.text-hide { font: 0/0 a; color: transparent; background-color: transparent; border: 0 }
.hidden { display: none !important }
.affix { position: fixed }
.visible-xs,.visible-sm,.visible-md,.visible-lg { display: none !important }
.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block { display: none !important }
.visible-print { display: none !important }
.visible-print-block { display: none !important }
.visible-print-inline { display: none !important }
.visible-print-inline-block { display: none !important }
.fa { display: inline-block; font: normal normal normal 14px/1 FontAwesome; font-size: inherit }
.fa-lg { font-size: 1.33333333em; line-height: 0.75em; vertical-align: -15% }
.fa-2x { font-size: 2em }
.fa-3x { font-size: 3em }
.fa-4x { font-size: 4em }
.fa-5x { font-size: 5em }
.fa-fw { width: 1.28571429em; text-align: center }
.fa-ul { padding-left: 0; margin-left: 2.14285714em; list-style-type: none }
.fa-ul>li { position: relative }
.fa-li { position: absolute; left: -2.14285714em; width: 2.14285714em; top: 0.14285714em; text-align: center }
.fa-li.fa-lg { left: -1.85714286em }
.fa-border { padding: .2em .25em .15em; border: solid 0.08em #eee }
.pull-right { float: right }
.pull-left { float: left }
.fa.pull-left { margin-right: .3em }
.fa.pull-right { margin-left: .3em }
.fa-spin { }
.fa-rotate-90 { }
.fa-rotate-180 { }
.fa-rotate-270 { }
.fa-flip-horizontal { }
.fa-flip-vertical { }
:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical { }
.fa-stack { position: relative; display: inline-block; width: 2em; height: 2em; line-height: 2em; vertical-align: middle }
.fa-stack-1x,.fa-stack-2x { position: absolute; left: 0; width: 100%; text-align: center }
.fa-stack-1x { line-height: inherit }
.fa-stack-2x { font-size: 2em }
.fa-inverse { color: #fff }
.fa-glass::before { content: "?" }
.fa-music::before { content: "?" }
.fa-search::before { content: "?" }
.fa-envelope-o::before { content: "?" }
.fa-heart::before { content: "?" }
.fa-star::before { content: "?" }
.fa-star-o::before { content: "?" }
.fa-user::before { content: "?" }
.fa-film::before { content: "?" }
.fa-th-large::before { content: "?" }
.fa-th::before { content: "?" }
.fa-th-list::before { content: "?" }
.fa-check::before { content: "?" }
.fa-remove::before,.fa-close::before,.fa-times::before { content: "?" }
.fa-search-plus::before { content: "?" }
.fa-search-minus::before { content: "?" }
.fa-power-off::before { content: "?" }
.fa-signal::before { content: "?" }
.fa-gear::before,.fa-cog::before { content: "?" }
.fa-trash-o::before { content: "?" }
.fa-home::before { content: "?" }
.fa-file-o::before { content: "?" }
.fa-clock-o::before { content: "?" }
.fa-road::before { content: "?" }
.fa-download::before { content: "?" }
.fa-arrow-circle-o-down::before { content: "?" }
.fa-arrow-circle-o-up::before { content: "?" }
.fa-inbox::before { content: "?" }
.fa-play-circle-o::before { content: "?" }
.fa-rotate-right::before,.fa-repeat::before { content: "?" }
.fa-refresh::before { content: "?" }
.fa-list-alt::before { content: "?" }
.fa-lock::before { content: "?" }
.fa-flag::before { content: "?" }
.fa-headphones::before { content: "?" }
.fa-volume-off::before { content: "?" }
.fa-volume-down::before { content: "?" }
.fa-volume-up::before { content: "?" }
.fa-qrcode::before { content: "?" }
.fa-barcode::before { content: "?" }
.fa-tag::before { content: "?" }
.fa-tags::before { content: "?" }
.fa-book::before { content: "?" }
.fa-bookmark::before { content: "?" }
.fa-print::before { content: "?" }
.fa-camera::before { content: "?" }
.fa-font::before { content: "?" }
.fa-bold::before { content: "?" }
.fa-italic::before { content: "?" }
.fa-text-height::before { content: "?" }
.fa-text-width::before { content: "?" }
.fa-align-left::before { content: "?" }
.fa-align-center::before { content: "?" }
.fa-align-right::before { content: "?" }
.fa-align-justify::before { content: "?" }
.fa-list::before { content: "?" }
.fa-dedent::before,.fa-outdent::before { content: "?" }
.fa-indent::before { content: "?" }
.fa-video-camera::before { content: "?" }
.fa-photo::before,.fa-image::before,.fa-picture-o::before { content: "?" }
.fa-pencil::before { content: "?" }
.fa-map-marker::before { content: "?" }
.fa-adjust::before { content: "?" }
.fa-tint::before { content: "?" }
.fa-edit::before,.fa-pencil-square-o::before { content: "?" }
.fa-share-square-o::before { content: "?" }
.fa-check-square-o::before { content: "?" }
.fa-arrows::before { content: "?" }
.fa-step-backward::before { content: "?" }
.fa-fast-backward::before { content: "?" }
.fa-backward::before { content: "?" }
.fa-play::before { content: "?" }
.fa-pause::before { content: "?" }
.fa-stop::before { content: "?" }
.fa-forward::before { content: "?" }
.fa-fast-forward::before { content: "?" }
.fa-step-forward::before { content: "?" }
.fa-eject::before { content: "?" }
.fa-chevron-left::before { content: "?" }
.fa-chevron-right::before { content: "?" }
.fa-plus-circle::before { content: "?" }
.fa-minus-circle::before { content: "?" }
.fa-times-circle::before { content: "?" }
.fa-check-circle::before { content: "?" }
.fa-question-circle::before { content: "?" }
.fa-info-circle::before { content: "?" }
.fa-crosshairs::before { content: "?" }
.fa-times-circle-o::before { content: "?" }
.fa-check-circle-o::before { content: "?" }
.fa-ban::before { content: "?" }
.fa-arrow-left::before { content: "?" }
.fa-arrow-right::before { content: "?" }
.fa-arrow-up::before { content: "?" }
.fa-arrow-down::before { content: "?" }
.fa-mail-forward::before,.fa-share::before { content: "?" }
.fa-expand::before { content: "?" }
.fa-compress::before { content: "?" }
.fa-plus::before { content: "?" }
.fa-minus::before { content: "?" }
.fa-asterisk::before { content: "?" }
.fa-exclamation-circle::before { content: "?" }
.fa-gift::before { content: "?" }
.fa-leaf::before { content: "?" }
.fa-fire::before { content: "?" }
.fa-eye::before { content: "?" }
.fa-eye-slash::before { content: "?" }
.fa-warning::before,.fa-exclamation-triangle::before { content: "?" }
.fa-plane::before { content: "?" }
.fa-calendar::before { content: "?" }
.fa-random::before { content: "?" }
.fa-comment::before { content: "?" }
.fa-magnet::before { content: "?" }
.fa-chevron-up::before { content: "?" }
.fa-chevron-down::before { content: "?" }
.fa-retweet::before { content: "?" }
.fa-shopping-cart::before { content: "?" }
.fa-folder::before { content: "?" }
.fa-folder-open::before { content: "?" }
.fa-arrows-v::before { content: "?" }
.fa-arrows-h::before { content: "?" }
.fa-bar-chart-o::before,.fa-bar-chart::before { content: "?" }
.fa-twitter-square::before { content: "?" }
.fa-facebook-square::before { content: "?" }
.fa-camera-retro::before { content: "?" }
.fa-key::before { content: "?" }
.fa-gears::before,.fa-cogs::before { content: "?" }
.fa-comments::before { content: "?" }
.fa-thumbs-o-up::before { content: "?" }
.fa-thumbs-o-down::before { content: "?" }
.fa-star-half::before { content: "?" }
.fa-heart-o::before { content: "?" }
.fa-sign-out::before { content: "?" }
.fa-linkedin-square::before { content: "?" }
.fa-thumb-tack::before { content: "?" }
.fa-external-link::before { content: "?" }
.fa-sign-in::before { content: "?" }
.fa-trophy::before { content: "?" }
.fa-github-square::before { content: "?" }
.fa-upload::before { content: "?" }
.fa-lemon-o::before { content: "?" }
.fa-phone::before { content: "?" }
.fa-square-o::before { content: "?" }
.fa-bookmark-o::before { content: "?" }
.fa-phone-square::before { content: "?" }
.fa-twitter::before { content: "?" }
.fa-facebook::before { content: "?" }
.fa-github::before { content: "?" }
.fa-unlock::before { content: "?" }
.fa-credit-card::before { content: "?" }
.fa-rss::before { content: "?" }
.fa-hdd-o::before { content: "?" }
.fa-bullhorn::before { content: "?" }
.fa-bell::before { content: "?" }
.fa-certificate::before { content: "?" }
.fa-hand-o-right::before { content: "?" }
.fa-hand-o-left::before { content: "?" }
.fa-hand-o-up::before { content: "?" }
.fa-hand-o-down::before { content: "?" }
.fa-arrow-circle-left::before { content: "?" }
.fa-arrow-circle-right::before { content: "?" }
.fa-arrow-circle-up::before { content: "?" }
.fa-arrow-circle-down::before { content: "?" }
.fa-globe::before { content: "?" }
.fa-wrench::before { content: "?" }
.fa-tasks::before { content: "?" }
.fa-filter::before { content: "?" }
.fa-briefcase::before { content: "?" }
.fa-arrows-alt::before { content: "?" }
.fa-group::before,.fa-users::before { content: "?" }
.fa-chain::before,.fa-link::before { content: "?" }
.fa-cloud::before { content: "?" }
.fa-flask::before { content: "?" }
.fa-cut::before,.fa-scissors::before { content: "?" }
.fa-copy::before,.fa-files-o::before { content: "?" }
.fa-paperclip::before { content: "?" }
.fa-save::before,.fa-floppy-o::before { content: "?" }
.fa-square::before { content: "?" }
.fa-navicon::before,.fa-reorder::before,.fa-bars::before { content: "?" }
.fa-list-ul::before { content: "?" }
.fa-list-ol::before { content: "?" }
.fa-strikethrough::before { content: "?" }
.fa-underline::before { content: "?" }
.fa-table::before { content: "?" }
.fa-magic::before { content: "?" }
.fa-truck::before { content: "?" }
.fa-pinterest::before { content: "?" }
.fa-pinterest-square::before { content: "?" }
.fa-google-plus-square::before { content: "?" }
.fa-google-plus::before { content: "?" }
.fa-money::before { content: "?" }
.fa-caret-down::before { content: "?" }
.fa-caret-up::before { content: "?" }
.fa-caret-left::before { content: "?" }
.fa-caret-right::before { content: "?" }
.fa-columns::before { content: "?" }
.fa-unsorted::before,.fa-sort::before { content: "?" }
.fa-sort-down::before,.fa-sort-desc::before { content: "?" }
.fa-sort-up::before,.fa-sort-asc::before { content: "?" }
.fa-envelope::before { content: "?" }
.fa-linkedin::before { content: "?" }
.fa-rotate-left::before,.fa-undo::before { content: "?" }
.fa-legal::before,.fa-gavel::before { content: "?" }
.fa-dashboard::before,.fa-tachometer::before { content: "?" }
.fa-comment-o::before { content: "?" }
.fa-comments-o::before { content: "?" }
.fa-flash::before,.fa-bolt::before { content: "?" }
.fa-sitemap::before { content: "?" }
.fa-umbrella::before { content: "?" }
.fa-paste::before,.fa-clipboard::before { content: "?" }
.fa-lightbulb-o::before { content: "?" }
.fa-exchange::before { content: "?" }
.fa-cloud-download::before { content: "?" }
.fa-cloud-upload::before { content: "?" }
.fa-user-md::before { content: "?" }
.fa-stethoscope::before { content: "?" }
.fa-suitcase::before { content: "?" }
.fa-bell-o::before { content: "?" }
.fa-coffee::before { content: "?" }
.fa-cutlery::before { content: "?" }
.fa-file-text-o::before { content: "?" }
.fa-building-o::before { content: "?" }
.fa-hospital-o::before { content: "?" }
.fa-ambulance::before { content: "?" }
.fa-medkit::before { content: "?" }
.fa-fighter-jet::before { content: "?" }
.fa-beer::before { content: "?" }
.fa-h-square::before { content: "?" }
.fa-plus-square::before { content: "?" }
.fa-angle-double-left::before { content: "?" }
.fa-angle-double-right::before { content: "?" }
.fa-angle-double-up::before { content: "?" }
.fa-angle-double-down::before { content: "?" }
.fa-angle-left::before { content: "?" }
.fa-angle-right::before { content: "?" }
.fa-angle-up::before { content: "?" }
.fa-angle-down::before { content: "?" }
.fa-desktop::before { content: "?" }
.fa-laptop::before { content: "?" }
.fa-tablet::before { content: "?" }
.fa-mobile-phone::before,.fa-mobile::before { content: "?" }
.fa-circle-o::before { content: "?" }
.fa-quote-left::before { content: "?" }
.fa-quote-right::before { content: "?" }
.fa-spinner::before { content: "?" }
.fa-circle::before { content: "?" }
.fa-mail-reply::before,.fa-reply::before { content: "?" }
.fa-github-alt::before { content: "?" }
.fa-folder-o::before { content: "?" }
.fa-folder-open-o::before { content: "?" }
.fa-smile-o::before { content: "?" }
.fa-frown-o::before { content: "?" }
.fa-meh-o::before { content: "?" }
.fa-gamepad::before { content: "?" }
.fa-keyboard-o::before { content: "?" }
.fa-flag-o::before { content: "?" }
.fa-flag-checkered::before { content: "?" }
.fa-terminal::before { content: "?" }
.fa-code::before { content: "?" }
.fa-mail-reply-all::before,.fa-reply-all::before { content: "?" }
.fa-star-half-empty::before,.fa-star-half-full::before,.fa-star-half-o::before { content: "?" }
.fa-location-arrow::before { content: "?" }
.fa-crop::before { content: "?" }
.fa-code-fork::before { content: "?" }
.fa-unlink::before,.fa-chain-broken::before { content: "?" }
.fa-question::before { content: "?" }
.fa-info::before { content: "?" }
.fa-exclamation::before { content: "?" }
.fa-superscript::before { content: "?" }
.fa-subscript::before { content: "?" }
.fa-eraser::before { content: "?" }
.fa-puzzle-piece::before { content: "?" }
.fa-microphone::before { content: "?" }
.fa-microphone-slash::before { content: "?" }
.fa-shield::before { content: "?" }
.fa-calendar-o::before { content: "?" }
.fa-fire-extinguisher::before { content: "?" }
.fa-rocket::before { content: "?" }
.fa-maxcdn::before { content: "?" }
.fa-chevron-circle-left::before { content: "?" }
.fa-chevron-circle-right::before { content: "?" }
.fa-chevron-circle-up::before { content: "?" }
.fa-chevron-circle-down::before { content: "?" }
.fa-html5::before { content: "?" }
.fa-css3::before { content: "?" }
.fa-anchor::before { content: "?" }
.fa-unlock-alt::before { content: "?" }
.fa-bullseye::before { content: "?" }
.fa-ellipsis-h::before { content: "?" }
.fa-ellipsis-v::before { content: "?" }
.fa-rss-square::before { content: "?" }
.fa-play-circle::before { content: "?" }
.fa-ticket::before { content: "?" }
.fa-minus-square::before { content: "?" }
.fa-minus-square-o::before { content: "?" }
.fa-level-up::before { content: "?" }
.fa-level-down::before { content: "?" }
.fa-check-square::before { content: "?" }
.fa-pencil-square::before { content: "?" }
.fa-external-link-square::before { content: "?" }
.fa-share-square::before { content: "?" }
.fa-compass::before { content: "?" }
.fa-toggle-down::before,.fa-caret-square-o-down::before { content: "?" }
.fa-toggle-up::before,.fa-caret-square-o-up::before { content: "?" }
.fa-toggle-right::before,.fa-caret-square-o-right::before { content: "?" }
.fa-euro::before,.fa-eur::before { content: "?" }
.fa-gbp::before { content: "?" }
.fa-dollar::before,.fa-usd::before { content: "?" }
.fa-rupee::before,.fa-inr::before { content: "?" }
.fa-cny::before,.fa-rmb::before,.fa-yen::before,.fa-jpy::before { content: "?" }
.fa-ruble::before,.fa-rouble::before,.fa-rub::before { content: "?" }
.fa-won::before,.fa-krw::before { content: "?" }
.fa-bitcoin::before,.fa-btc::before { content: "?" }
.fa-file::before { content: "?" }
.fa-file-text::before { content: "?" }
.fa-sort-alpha-asc::before { content: "?" }
.fa-sort-alpha-desc::before { content: "?" }
.fa-sort-amount-asc::before { content: "?" }
.fa-sort-amount-desc::before { content: "?" }
.fa-sort-numeric-asc::before { content: "?" }
.fa-sort-numeric-desc::before { content: "?" }
.fa-thumbs-up::before { content: "?" }
.fa-thumbs-down::before { content: "?" }
.fa-youtube-square::before { content: "?" }
.fa-youtube::before { content: "?" }
.fa-xing::before { content: "?" }
.fa-xing-square::before { content: "?" }
.fa-youtube-play::before { content: "?" }
.fa-dropbox::before { content: "?" }
.fa-stack-overflow::before { content: "?" }
.fa-instagram::before { content: "?" }
.fa-flickr::before { content: "?" }
.fa-adn::before { content: "?" }
.fa-bitbucket::before { content: "?" }
.fa-bitbucket-square::before { content: "?" }
.fa-tumblr::before { content: "?" }
.fa-tumblr-square::before { content: "?" }
.fa-long-arrow-down::before { content: "?" }
.fa-long-arrow-up::before { content: "?" }
.fa-long-arrow-left::before { content: "?" }
.fa-long-arrow-right::before { content: "?" }
.fa-apple::before { content: "?" }
.fa-windows::before { content: "?" }
.fa-android::before { content: "?" }
.fa-linux::before { content: "?" }
.fa-dribbble::before { content: "?" }
.fa-skype::before { content: "?" }
.fa-foursquare::before { content: "?" }
.fa-trello::before { content: "?" }
.fa-female::before { content: "?" }
.fa-male::before { content: "?" }
.fa-gittip::before { content: "?" }
.fa-sun-o::before { content: "?" }
.fa-moon-o::before { content: "?" }
.fa-archive::before { content: "?" }
.fa-bug::before { content: "?" }
.fa-vk::before { content: "?" }
.fa-weibo::before { content: "?" }
.fa-renren::before { content: "?" }
.fa-pagelines::before { content: "?" }
.fa-stack-exchange::before { content: "?" }
.fa-arrow-circle-o-right::before { content: "?" }
.fa-arrow-circle-o-left::before { content: "?" }
.fa-toggle-left::before,.fa-caret-square-o-left::before { content: "?" }
.fa-dot-circle-o::before { content: "?" }
.fa-wheelchair::before { content: "?" }
.fa-vimeo-square::before { content: "?" }
.fa-turkish-lira::before,.fa-try::before { content: "?" }
.fa-plus-square-o::before { content: "?" }
.fa-space-shuttle::before { content: "?" }
.fa-slack::before { content: "?" }
.fa-envelope-square::before { content: "?" }
.fa-wordpress::before { content: "?" }
.fa-openid::before { content: "?" }
.fa-institution::before,.fa-bank::before,.fa-university::before { content: "?" }
.fa-mortar-board::before,.fa-graduation-cap::before { content: "?" }
.fa-yahoo::before { content: "?" }
.fa-google::before { content: "?" }
.fa-reddit::before { content: "?" }
.fa-reddit-square::before { content: "?" }
.fa-stumbleupon-circle::before { content: "?" }
.fa-stumbleupon::before { content: "?" }
.fa-delicious::before { content: "?" }
.fa-digg::before { content: "?" }
.fa-pied-piper::before { content: "?" }
.fa-pied-piper-alt::before { content: "?" }
.fa-drupal::before { content: "?" }
.fa-joomla::before { content: "?" }
.fa-language::before { content: "?" }
.fa-fax::before { content: "?" }
.fa-building::before { content: "?" }
.fa-child::before { content: "?" }
.fa-paw::before { content: "?" }
.fa-spoon::before { content: "?" }
.fa-cube::before { content: "?" }
.fa-cubes::before { content: "?" }
.fa-behance::before { content: "?" }
.fa-behance-square::before { content: "?" }
.fa-steam::before { content: "?" }
.fa-steam-square::before { content: "?" }
.fa-recycle::before { content: "?" }
.fa-automobile::before,.fa-car::before { content: "?" }
.fa-cab::before,.fa-taxi::before { content: "?" }
.fa-tree::before { content: "?" }
.fa-spotify::before { content: "?" }
.fa-deviantart::before { content: "?" }
.fa-soundcloud::before { content: "?" }
.fa-database::before { content: "?" }
.fa-file-pdf-o::before { content: "?" }
.fa-file-word-o::before { content: "?" }
.fa-file-excel-o::before { content: "?" }
.fa-file-powerpoint-o::before { content: "?" }
.fa-file-photo-o::before,.fa-file-picture-o::before,.fa-file-image-o::before { content: "?" }
.fa-file-zip-o::before,.fa-file-archive-o::before { content: "?" }
.fa-file-sound-o::before,.fa-file-audio-o::before { content: "?" }
.fa-file-movie-o::before,.fa-file-video-o::before { content: "?" }
.fa-file-code-o::before { content: "?" }
.fa-vine::before { content: "?" }
.fa-codepen::before { content: "?" }
.fa-jsfiddle::before { content: "?" }
.fa-life-bouy::before,.fa-life-buoy::before,.fa-life-saver::before,.fa-support::before,.fa-life-ring::before { content: "?" }
.fa-circle-o-notch::before { content: "?" }
.fa-ra::before,.fa-rebel::before { content: "?" }
.fa-ge::before,.fa-empire::before { content: "?" }
.fa-git-square::before { content: "?" }
.fa-git::before { content: "?" }
.fa-hacker-news::before { content: "?" }
.fa-tencent-weibo::before { content: "?" }
.fa-qq::before { content: "?" }
.fa-wechat::before,.fa-weixin::before { content: "?" }
.fa-send::before,.fa-paper-plane::before { content: "?" }
.fa-send-o::before,.fa-paper-plane-o::before { content: "?" }
.fa-history::before { content: "?" }
.fa-circle-thin::before { content: "?" }
.fa-header::before { content: "?" }
.fa-paragraph::before { content: "?" }
.fa-sliders::before { content: "?" }
.fa-share-alt::before { content: "?" }
.fa-share-alt-square::before { content: "?" }
.fa-bomb::before { content: "?" }
.fa-soccer-ball-o::before,.fa-futbol-o::before { content: "?" }
.fa-tty::before { content: "?" }
.fa-binoculars::before { content: "?" }
.fa-plug::before { content: "?" }
.fa-slideshare::before { content: "?" }
.fa-twitch::before { content: "?" }
.fa-yelp::before { content: "?" }
.fa-newspaper-o::before { content: "?" }
.fa-wifi::before { content: "?" }
.fa-calculator::before { content: "?" }
.fa-paypal::before { content: "?" }
.fa-google-wallet::before { content: "?" }
.fa-cc-visa::before { content: "?" }
.fa-cc-mastercard::before { content: "?" }
.fa-cc-discover::before { content: "?" }
.fa-cc-amex::before { content: "?" }
.fa-cc-paypal::before { content: "?" }
.fa-cc-stripe::before { content: "?" }
.fa-bell-slash::before { content: "?" }
.fa-bell-slash-o::before { content: "?" }
.fa-trash::before { content: "?" }
.fa-copyright::before { content: "?" }
.fa-at::before { content: "?" }
.fa-eyedropper::before { content: "?" }
.fa-paint-brush::before { content: "?" }
.fa-birthday-cake::before { content: "?" }
.fa-area-chart::before { content: "?" }
.fa-pie-chart::before { content: "?" }
.fa-line-chart::before { content: "?" }
.fa-lastfm::before { content: "?" }
.fa-lastfm-square::before { content: "?" }
.fa-toggle-off::before { content: "?" }
.fa-toggle-on::before { content: "?" }
.fa-bicycle::before { content: "?" }
.fa-bus::before { content: "?" }
.fa-ioxhost::before { content: "?" }
.fa-angellist::before { content: "?" }
.fa-cc::before { content: "?" }
.fa-shekel::before,.fa-sheqel::before,.fa-ils::before { content: "?" }
.fa-meanpath::before { content: "?" }
.modal.fade .modal-dialog { }
code { color: #000 }
pre { font-size: inherit; line-height: inherit }
label { font-weight: normal }
.border-box-sizing { }
.corner-all { }
.no-padding { padding: 0px }
.hbox { display: flex }
.hbox>* { }
.vbox { display: flex }
.vbox>* { }
.hbox.reverse,.vbox.reverse,.reverse { }
.hbox.box-flex0,.vbox.box-flex0,.box-flex0 { width: auto }
.hbox.box-flex1,.vbox.box-flex1,.box-flex1 { }
.hbox.box-flex,.vbox.box-flex,.box-flex { }
.hbox.box-flex2,.vbox.box-flex2,.box-flex2 { }
.box-group1 { }
.box-group2 { }
.hbox.start,.vbox.start,.start { }
.hbox.end,.vbox.end,.end { }
.hbox.center,.vbox.center,.center { }
.hbox.baseline,.vbox.baseline,.baseline { }
.hbox.stretch,.vbox.stretch,.stretch { }
.hbox.align-start,.vbox.align-start,.align-start { }
.hbox.align-end,.vbox.align-end,.align-end { }
.hbox.align-center,.vbox.align-center,.align-center { }
.hbox.align-baseline,.vbox.align-baseline,.align-baseline { }
.hbox.align-stretch,.vbox.align-stretch,.align-stretch { }
div.error { margin: 2em; text-align: center }
div.error>h1 { font-size: 500%; line-height: normal }
div.error>p { font-size: 200%; line-height: normal }
div.traceback-wrapper { text-align: left; max-width: 800px; margin: auto }
body { background-color: #fff; position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; overflow: visible }
body>#header { display: none; background-color: #fff; position: relative; z-index: 100 }
body>#header #header-container { padding-bottom: 5px; padding-top: 5px }
body>#header .header-bar { width: 100%; height: 1px; background: #e7e7e7; margin-bottom: -1px }
#header-spacer { width: 100%; visibility: hidden }
#ipython_notebook { padding-left: 0px; padding-top: 1px; padding-bottom: 1px }
[dir="rtl"] #ipython_notebook { float: right !important }
#noscript { width: auto; padding-top: 16px; padding-bottom: 16px; text-align: center; font-size: 22px; color: red; font-weight: bold }
#ipython_notebook img { height: 28px }
#site { width: 100%; display: none; overflow: auto }
.ui-button .ui-button-text { padding: 0.2em 0.8em; font-size: 77% }
input.ui-button { padding: 0.3em 0.9em }
span#login_widget { float: right }
span#login_widget>.button,#logout { color: #333; background-color: #fff; border-color: #ccc }
span#login_widget>.button:focus,#logout:focus,span#login_widget>.button.focus,#logout.focus { color: #333; background-color: #e6e6e6; border-color: #8c8c8c }
span#login_widget>.button:hover,#logout:hover { color: #333; background-color: #e6e6e6; border-color: #adadad }
span#login_widget>.button:active,#logout:active,span#login_widget>.button.active,#logout.active,.open>.dropdown-togglespan#login_widget>.button,.open>.dropdown-toggle#logout { color: #333; background-color: #e6e6e6; border-color: #adadad }
span#login_widget>.button:active:hover,#logout:active:hover,span#login_widget>.button.active:hover,#logout.active:hover,.open>.dropdown-togglespan#login_widget>.button:hover,.open>.dropdown-toggle#logout:hover,span#login_widget>.button:active:focus,#logout:active:focus,span#login_widget>.button.active:focus,#logout.active:focus,.open>.dropdown-togglespan#login_widget>.button:focus,.open>.dropdown-toggle#logout:focus,span#login_widget>.button:active.focus,#logout:active.focus,span#login_widget>.button.active.focus,#logout.active.focus,.open>.dropdown-togglespan#login_widget>.button.focus,.open>.dropdown-toggle#logout.focus { color: #333; background-color: #d4d4d4; border-color: #8c8c8c }
span#login_widget>.button:active,#logout:active,span#login_widget>.button.active,#logout.active,.open>.dropdown-togglespan#login_widget>.button,.open>.dropdown-toggle#logout { background-image: none }
span#login_widget>.button.disabled:hover,#logout.disabled:hover,span#login_widget>.button[disabled]:hover,#logout[disabled]:hover,fieldset[disabled] span#login_widget>.button:hover,fieldset[disabled] #logout:hover,span#login_widget>.button.disabled:focus,#logout.disabled:focus,span#login_widget>.button[disabled]:focus,#logout[disabled]:focus,fieldset[disabled] span#login_widget>.button:focus,fieldset[disabled] #logout:focus,span#login_widget>.button.disabled.focus,#logout.disabled.focus,span#login_widget>.button[disabled].focus,#logout[disabled].focus,fieldset[disabled] span#login_widget>.button.focus,fieldset[disabled] #logout.focus { background-color: #fff; border-color: #ccc }
span#login_widget>.button .badge,#logout .badge { color: #fff; background-color: #333 }
.nav-header { text-transform: none }
#header>span { margin-top: 10px }
.modal_stretch .modal-dialog { display: flex; min-height: 80vh }
.modal_stretch .modal-dialog .modal-body { max-height: calc(100vh - 200px); overflow: auto }
.center-nav { display: inline-block; margin-bottom: -4px }
.alternate_upload { background-color: none; display: inline }
.alternate_upload.form { padding: 0; margin: 0 }
.alternate_upload input.fileinput { text-align: center; vertical-align: middle; display: inline; opacity: 0; z-index: 2; width: 12ex; margin-right: -12ex }
.alternate_upload .btn-upload { height: 22px }
[dir="rtl"] #tabs li { float: right }
ul#tabs { margin-bottom: 4px }
[dir="rtl"] ul#tabs { margin-right: 0px }
ul#tabs a { padding-top: 6px; padding-bottom: 4px }
ul.breadcrumb a:focus,ul.breadcrumb a:hover { text-decoration: none }
ul.breadcrumb i.icon-home { font-size: 16px; margin-right: 4px }
ul.breadcrumb span { color: #5e5e5e }
.list_toolbar { padding: 4px 0 4px 0; vertical-align: middle }
.list_toolbar .tree-buttons { padding-top: 1px }
[dir="rtl"] .list_toolbar .tree-buttons { float: left !important }
[dir="rtl"] .list_toolbar .pull-right { padding-top: 1px; float: left !important }
[dir="rtl"] .list_toolbar .pull-left { float: right !important }
.dynamic-buttons { padding-top: 3px; display: inline-block }
.list_toolbar [class*="span"] { min-height: 24px }
.list_header { font-weight: bold; background-color: #EEE }
.list_placeholder { font-weight: bold; padding-top: 4px; padding-bottom: 4px; padding-left: 7px; padding-right: 7px }
.list_container { margin-top: 4px; margin-bottom: 20px; border: 1px solid #ddd }
.list_container>div { border-bottom: 1px solid #ddd }
.list_container>div:hover .list-item { background-color: red }
.list_container>div:last-child { border: none }
.list_item:hover .list_item { background-color: #ddd }
.list_item a { text-decoration: none }
.list_item:hover { background-color: #fafafa }
.list_header>div,.list_item>div { padding-top: 4px; padding-bottom: 4px; padding-left: 7px; padding-right: 7px; line-height: 22px }
.list_header>div input,.list_item>div input { margin-right: 7px; margin-left: 14px; vertical-align: baseline; line-height: 22px; position: relative; top: -1px }
.list_header>div .item_link,.list_item>div .item_link { margin-left: -1px; vertical-align: baseline; line-height: 22px }
.new-file input[type="checkbox"] { visibility: hidden }
.item_name { line-height: 22px; height: 24px }
.item_icon { font-size: 14px; color: #5e5e5e; margin-right: 7px; margin-left: 7px; line-height: 22px; vertical-align: baseline }
.item_buttons { line-height: 1em; margin-left: -5px }
.item_buttons .btn,.item_buttons .btn-group,.item_buttons .input-group { float: left }
.item_buttons>.btn,.item_buttons>.btn-group,.item_buttons>.input-group { margin-left: 5px }
.item_buttons .btn { min-width: 13ex }
.item_buttons .running-indicator { padding-top: 4px; color: #5cb85c }
.item_buttons .kernel-name { padding-top: 4px; color: #5bc0de; margin-right: 7px; float: left }
.toolbar_info { height: 24px; line-height: 24px }
.list_item input:not([type="checkbox"]) { padding-top: 3px; padding-bottom: 3px; height: 22px; line-height: 14px; margin: 0px }
.highlight_text { color: blue }
#project_name { display: inline-block; padding-left: 7px; margin-left: -2px }
#project_name>.breadcrumb { padding: 0px; margin-bottom: 0px; background-color: transparent; font-weight: bold }
#tree-selector { padding-right: 0px }
[dir="rtl"] #tree-selector a { float: right }
#button-select-all { min-width: 50px }
#select-all { margin-left: 7px; margin-right: 2px }
.menu_icon { margin-right: 2px }
.tab-content .row { margin-left: 0px; margin-right: 0px }
.folder_icon::before { display: inline-block; font: normal normal normal 14px/1 FontAwesome; font-size: inherit; content: "?" }
.folder_icon::before.pull-left { margin-right: .3em }
.folder_icon::before.pull-right { margin-left: .3em }
.notebook_icon::before { display: inline-block; font: normal normal normal 14px/1 FontAwesome; font-size: inherit; content: "?"; position: relative; top: -1px }
.notebook_icon::before.pull-left { margin-right: .3em }
.notebook_icon::before.pull-right { margin-left: .3em }
.running_notebook_icon::before { display: inline-block; font: normal normal normal 14px/1 FontAwesome; font-size: inherit; content: "?"; position: relative; top: -1px; color: #5cb85c }
.running_notebook_icon::before.pull-left { margin-right: .3em }
.running_notebook_icon::before.pull-right { margin-left: .3em }
.file_icon::before { display: inline-block; font: normal normal normal 14px/1 FontAwesome; font-size: inherit; content: "?"; position: relative; top: -2px }
.file_icon::before.pull-left { margin-right: .3em }
.file_icon::before.pull-right { margin-left: .3em }
#notebook_toolbar .pull-right { padding-top: 0px; margin-right: -1px }
ul#new-menu { left: auto; right: 0 }
[dir="rtl"] #new-menu { text-align: right }
.kernel-menu-icon { padding-right: 12px; width: 24px; content: "?" }
.kernel-menu-icon::before { content: "?" }
.kernel-menu-icon-current::before { content: "?" }
#tab_content { padding-top: 20px }
#running .panel-group .panel { margin-top: 3px; margin-bottom: 1em }
#running .panel-group .panel .panel-heading { background-color: #EEE; padding-top: 4px; padding-bottom: 4px; padding-left: 7px; padding-right: 7px; line-height: 22px }
#running .panel-group .panel .panel-heading a:focus,#running .panel-group .panel .panel-heading a:hover { text-decoration: none }
#running .panel-group .panel .panel-body { padding: 0px }
#running .panel-group .panel .panel-body .list_container { margin-top: 0px; margin-bottom: 0px; border: 0px }
#running .panel-group .panel .panel-body .list_container .list_item { border-bottom: 1px solid #ddd }
#running .panel-group .panel .panel-body .list_container .list_item:last-child { border-bottom: 0px }
[dir="rtl"] #running .col-sm-8 { float: right !important }
.delete-button { display: none }
.duplicate-button { display: none }
.rename-button { display: none }
.shutdown-button { display: none }
.dynamic-instructions { display: inline-block; padding-top: 4px }
.selected-keymap i.fa { padding: 0px 5px }
.selected-keymap i.fa::before { content: "?" }
#mode-menu { overflow: auto; max-height: 20em }
.edit_app #header { }
.edit_app #menubar .navbar { margin-bottom: -1px }
.dirty-indicator { display: inline-block; font: normal normal normal 14px/1 FontAwesome; font-size: inherit; width: 20px }
.dirty-indicator.pull-left { margin-right: .3em }
.dirty-indicator.pull-right { margin-left: .3em }
.dirty-indicator-dirty { display: inline-block; font: normal normal normal 14px/1 FontAwesome; font-size: inherit; width: 20px }
.dirty-indicator-dirty.pull-left { margin-right: .3em }
.dirty-indicator-dirty.pull-right { margin-left: .3em }
.dirty-indicator-clean { display: inline-block; font: normal normal normal 14px/1 FontAwesome; font-size: inherit; width: 20px }
.dirty-indicator-clean.pull-left { margin-right: .3em }
.dirty-indicator-clean.pull-right { margin-left: .3em }
.dirty-indicator-clean::before { display: inline-block; font: normal normal normal 14px/1 FontAwesome; font-size: inherit; content: "?" }
.dirty-indicator-clean::before.pull-left { margin-right: .3em }
.dirty-indicator-clean::before.pull-right { margin-left: .3em }
#filename { font-size: 16pt; display: table; padding: 0px 5px }
#current-mode { padding-left: 5px; padding-right: 5px }
#texteditor-backdrop { padding-top: 20px; padding-bottom: 20px }
.ansibold { font-weight: bold }
.ansiblack { color: black }
.ansired { color: darkred }
.ansigreen { color: darkgreen }
.ansiyellow { color: #c4a000 }
.ansiblue { color: darkblue }
.ansipurple { color: darkviolet }
.ansicyan { color: steelblue }
.ansigray { color: gray }
.ansibgblack { background-color: black }
.ansibgred { background-color: red }
.ansibggreen { background-color: green }
.ansibgyellow { background-color: yellow }
.ansibgblue { background-color: blue }
.ansibgpurple { background-color: magenta }
.ansibgcyan { background-color: cyan }
.ansibggray { background-color: gray }
div.cell { display: flex; border-width: 1px; border-style: solid; border-color: transparent; width: 100%; padding: 5px; margin: 0px; outline: none; border-left-width: 1px; padding-left: 5px; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%) }
div.cell.jupyter-soft-selected { border-left-color: #E3F2FD; border-left-width: 1px; padding-left: 5px; border-right-color: #E3F2FD; border-right-width: 1px; background: #E3F2FD }
div.cell.selected { border-color: #ababab; border-left-width: 0px; padding-left: 6px; background: linear-gradient(to right, #42A5F5 -40px, #42A5F5 5px, transparent 5px, transparent 100%) }
div.cell.selected.jupyter-soft-selected { border-left-width: 0; padding-left: 6px; background: linear-gradient(to right, #42A5F5 -40px, #42A5F5 7px, #E3F2FD 7px, #E3F2FD 100%) }
.edit_mode div.cell.selected { border-color: #66BB6A; border-left-width: 0px; padding-left: 6px; background: linear-gradient(to right, #66BB6A -40px, #66BB6A 5px, transparent 5px, transparent 100%) }
.prompt { min-width: 14ex; padding: 0.4em; margin: 0px; font-family: monospace; text-align: right; line-height: 1.21429em; cursor: default }
div.inner_cell { min-width: 0; display: flex }
div.input_area { border: 1px solid #cfcfcf; background: #f7f7f7; line-height: 1.21429em }
div.prompt:empty { padding-top: 0; padding-bottom: 0 }
div.unrecognized_cell { padding: 5px 5px 5px 0px; display: flex }
div.unrecognized_cell .inner_cell { padding: 5px; font-weight: bold; color: red; border: 1px solid #cfcfcf; background: #eaeaea }
div.unrecognized_cell .inner_cell a { color: inherit; text-decoration: none }
div.unrecognized_cell .inner_cell a:hover { color: inherit; text-decoration: none }
div.code_cell { }
div.input { page-break-inside: avoid; display: flex }
div.input_prompt { color: #303F9F; border-top: 1px solid transparent }
div.input_area>div.highlight { margin: 0.4em; border: none; padding: 0px; background-color: transparent }
div.input_area>div.highlight>pre { margin: 0px; border: none; padding: 0px; background-color: transparent }
.CodeMirror { line-height: 1.21429em; font-size: 14px; height: auto; background: none }
.CodeMirror-scroll { }
.CodeMirror-lines { padding: 0.4em }
.CodeMirror-linenumber { padding: 0 8px 0 4px }
.CodeMirror-gutters { }
.CodeMirror pre { padding: 0; border: 0 }
.highlight-base { color: #000 }
.highlight-variable { color: #000 }
.highlight-variable-2 { color: #1a1a1a }
.highlight-variable-3 { color: #333333 }
.highlight-string { color: #BA2121 }
.highlight-comment { color: #408080; font-style: italic }
.highlight-number { color: #080 }
.highlight-atom { color: #88F }
.highlight-keyword { color: #008000; font-weight: bold }
.highlight-builtin { color: #008000 }
.highlight-error { color: #f00 }
.highlight-operator { color: #AA22FF; font-weight: bold }
.highlight-meta { color: #AA22FF }
.highlight-def { color: #00f }
.highlight-string-2 { color: #f50 }
.highlight-qualifier { color: #555 }
.highlight-bracket { color: #997 }
.highlight-tag { color: #170 }
.highlight-attribute { color: #00c }
.highlight-header { color: blue }
.highlight-quote { color: #090 }
.highlight-link { color: #00c }
.cm-s-ipython span.cm-keyword { color: #008000; font-weight: bold }
.cm-s-ipython span.cm-atom { color: #88F }
.cm-s-ipython span.cm-number { color: #080 }
.cm-s-ipython span.cm-def { color: #00f }
.cm-s-ipython span.cm-variable { color: #000 }
.cm-s-ipython span.cm-operator { color: #AA22FF; font-weight: bold }
.cm-s-ipython span.cm-variable-2 { color: #1a1a1a }
.cm-s-ipython span.cm-variable-3 { color: #333333 }
.cm-s-ipython span.cm-comment { color: #408080; font-style: italic }
.cm-s-ipython span.cm-string { color: #BA2121 }
.cm-s-ipython span.cm-string-2 { color: #f50 }
.cm-s-ipython span.cm-meta { color: #AA22FF }
.cm-s-ipython span.cm-qualifier { color: #555 }
.cm-s-ipython span.cm-builtin { color: #008000 }
.cm-s-ipython span.cm-bracket { color: #997 }
.cm-s-ipython span.cm-tag { color: #170 }
.cm-s-ipython span.cm-attribute { color: #00c }
.cm-s-ipython span.cm-header { color: blue }
.cm-s-ipython span.cm-quote { color: #090 }
.cm-s-ipython span.cm-link { color: #00c }
.cm-s-ipython span.cm-error { color: #f00 }
.cm-s-ipython span.cm-tab { background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAYAAAAkuj5RAAAAAXNSR0IArs4c6QAAAGFJREFUSMft1LsRQFAQheHPowAKoACx3IgEKtaEHujDjORSgWTH/ZOdnZOcM/sgk/kFFWY0qV8foQwS4MKBCS3qR6ixBJvElOobYAtivseIE120FaowJPN75GMu8j/LfMwNjh4HUpwg4LUAAAAASUVORK5CYII="); background-position: right; background-repeat: no-repeat }
div.output_wrapper { position: relative; display: flex; z-index: 1 }
div.output_scroll { height: 24em; width: 100%; overflow: auto; display: block }
div.output_collapsed { margin: 0px; padding: 0px; display: flex }
div.out_prompt_overlay { height: 100%; padding: 0px 0.4em; position: absolute }
div.out_prompt_overlay:hover { background: rgba(240, 240, 240, 0.5) }
div.output_prompt { color: #D84315 }
div.output_area { padding: 0px; page-break-inside: avoid; display: flex }
div.output_area .MathJax_Display { text-align: left !important }
div.output_area .rendered_html table { margin-left: 0; margin-right: 0 }
div.output_area .rendered_html img { margin-left: 0; margin-right: 0 }
div.output_area img,div.output_area svg { max-width: 100%; height: auto }
div.output_area img.unconfined,div.output_area svg.unconfined { max-width: none }
.output { display: flex }
div.output_area pre { margin: 0; padding: 0; border: 0; vertical-align: baseline; color: black; background-color: transparent }
div.output_subarea { padding: 0.4em; max-width: calc(100% - 14ex) }
div.output_scroll div.output_subarea { }
div.output_text { text-align: left; color: #000; line-height: 1.21429em }
div.output_stderr { background: #fdd }
div.output_latex { text-align: left }
div.output_javascript:empty { padding: 0 }
.js-error { color: darkred }
div.raw_input_container { line-height: 1.21429em; padding-top: 5px }
pre.raw_input_prompt { }
input.raw_input { font-family: monospace; font-size: inherit; color: inherit; width: auto; vertical-align: baseline; padding: 0em 0.25em; margin: 0em 0.25em }
input.raw_input:focus { }
p.p-space { margin-bottom: 10px }
div.output_unrecognized { padding: 5px; font-weight: bold; color: red }
div.output_unrecognized a { color: inherit; text-decoration: none }
div.output_unrecognized a:hover { color: inherit; text-decoration: none }
.rendered_html { color: #000 }
.rendered_html em { font-style: italic }
.rendered_html strong { font-weight: bold }
.rendered_html u { text-decoration: underline }
.rendered_html :link { text-decoration: underline }
.rendered_html :visited { text-decoration: underline }
.rendered_html h1 { font-size: 185.7%; margin: 1.08em 0 0 0; font-weight: bold; line-height: 1.0 }
.rendered_html h2 { font-size: 157.1%; margin: 1.27em 0 0 0; font-weight: bold; line-height: 1.0 }
.rendered_html h3 { font-size: 128.6%; margin: 1.55em 0 0 0; font-weight: bold; line-height: 1.0 }
.rendered_html h4 { font-size: 100%; margin: 2em 0 0 0; font-weight: bold; line-height: 1.0 }
.rendered_html h5 { font-size: 100%; margin: 2em 0 0 0; font-weight: bold; line-height: 1.0; font-style: italic }
.rendered_html h6 { font-size: 100%; margin: 2em 0 0 0; font-weight: bold; line-height: 1.0; font-style: italic }
.rendered_html h1:first-child { margin-top: 0.538em }
.rendered_html h2:first-child { margin-top: 0.636em }
.rendered_html h3:first-child { margin-top: 0.777em }
.rendered_html h4:first-child { margin-top: 1em }
.rendered_html h5:first-child { margin-top: 1em }
.rendered_html h6:first-child { margin-top: 1em }
.rendered_html ul { list-style: disc; margin: 0em 2em; padding-left: 0px }
.rendered_html ul ul { list-style: square; margin: 0em 2em }
.rendered_html ul ul ul { list-style: circle; margin: 0em 2em }
.rendered_html ol { list-style: decimal; margin: 0em 2em; padding-left: 0px }
.rendered_html ol ol { list-style: upper-alpha; margin: 0em 2em }
.rendered_html ol ol ol { list-style: lower-alpha; margin: 0em 2em }
.rendered_html ol ol ol ol { list-style: lower-roman; margin: 0em 2em }
.rendered_html ol ol ol ol ol { list-style: decimal; margin: 0em 2em }
.rendered_html *+ul { margin-top: 1em }
.rendered_html *+ol { margin-top: 1em }
.rendered_html hr { color: black; background-color: black }
.rendered_html pre { margin: 1em 2em }
.rendered_html pre,.rendered_html code { border: 0; background-color: #fff; color: #000; font-size: 100%; padding: 0px }
.rendered_html blockquote { margin: 1em 2em }
.rendered_html table { margin-left: auto; margin-right: auto; border: 1px solid black; border-collapse: collapse }
.rendered_html tr,.rendered_html th,.rendered_html td { border: 1px solid black; border-collapse: collapse; margin: 1em 2em }
.rendered_html td,.rendered_html th { text-align: left; vertical-align: middle; padding: 4px }
.rendered_html th { font-weight: bold }
.rendered_html *+table { margin-top: 1em }
.rendered_html p { text-align: left }
.rendered_html *+p { margin-top: 1em }
.rendered_html img { display: block; margin-left: auto; margin-right: auto }
.rendered_html *+img { margin-top: 1em }
.rendered_html img,.rendered_html svg { max-width: 100%; height: auto }
.rendered_html img.unconfined,.rendered_html svg.unconfined { max-width: none }
div.text_cell { display: flex }
div.text_cell_render { outline: none; width: inherit; border-style: none; padding: 0.5em 0.5em 0.5em 0.4em; color: #000 }
a.anchor-link:link { text-decoration: none; padding: 0px 20px; visibility: hidden }
h1:hover .anchor-link,h2:hover .anchor-link,h3:hover .anchor-link,h4:hover .anchor-link,h5:hover .anchor-link,h6:hover .anchor-link { visibility: visible }
.text_cell.rendered .input_area { display: none }
.text_cell.rendered .rendered_html { }
.text_cell.unrendered .text_cell_render { display: none }
.cm-header-1,.cm-header-2,.cm-header-3,.cm-header-4,.cm-header-5,.cm-header-6 { font-weight: bold; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif }
.cm-header-1 { font-size: 185.7% }
.cm-header-2 { font-size: 157.1% }
.cm-header-3 { font-size: 128.6% }
.cm-header-4 { font-size: 110% }
.cm-header-5 { font-size: 100%; font-style: italic }
.cm-header-6 { font-size: 100%; font-style: italic }
#ipython-main-app { height: 100% }
div#notebook_panel { margin: 0px; padding: 0px; height: 100% }
div#notebook { font-size: 14px; line-height: 20px; width: 100%; padding-top: 20px; margin: 0px; outline: none; min-height: 100% }
div.ui-widget-content { border: 1px solid #ababab; outline: none }
pre.dialog { background-color: #f7f7f7; border: 1px solid #ddd; padding: 0.4em; padding-left: 2em }
p.dialog { padding: 0.2em }
pre,code,kbd,samp { white-space: pre-wrap }
#fonttest { font-family: monospace }
p { margin-bottom: 0 }
.end_space { min-height: 100px }
.notebook_app>#header { }
kbd { border-style: solid; border-width: 1px; margin: 2px; padding-left: 2px; padding-right: 2px; padding-top: 1px; padding-bottom: 1px }
.celltoolbar { border: thin solid #CFCFCF; border-bottom: none; background: #EEE; width: 100%; height: 29px; padding-right: 4px; display: -webkit-flex }
.ctb_hideshow { display: none; vertical-align: bottom }
.ctb_global_show .ctb_show.ctb_hideshow { display: block }
.ctb_global_show .ctb_show+.input_area,.ctb_global_show .ctb_show+div.text_cell_input,.ctb_global_show .ctb_show~div.text_cell_render { }
.ctb_global_show .ctb_show~div.text_cell_render { border: 1px solid #cfcfcf }
.celltoolbar { font-size: 87%; padding-top: 3px }
.celltoolbar select { color: #555555; background-color: #fff; background-image: none; border: 1px solid #ccc; line-height: 1.5; width: inherit; font-size: inherit; height: 22px; padding: 0px; display: inline-block }
.celltoolbar select:focus { border-color: #66afe9; outline: 0 }
.celltoolbar select::-moz-placeholder { color: #999; opacity: 1 }
.celltoolbar select:-ms-input-placeholder { color: #999 }
.celltoolbar select::-webkit-input-placeholder { color: #999 }
.celltoolbar select::-ms-expand { border: 0; background-color: transparent }
.celltoolbar select[disabled],.celltoolbar select[readonly],fieldset[disabled] .celltoolbar select { background-color: #eeeeee; opacity: 1 }
.celltoolbar select[disabled],fieldset[disabled] .celltoolbar select { cursor: not-allowed }
textarea.celltoolbar select { height: auto }
select.celltoolbar select { height: 30px; line-height: 30px }
textarea.celltoolbar select,select[multiple].celltoolbar select { height: auto }
.celltoolbar label { margin-left: 5px; margin-right: 5px }
.completions { position: absolute; z-index: 110; overflow: hidden; border: 1px solid #ababab; line-height: 1 }
.completions select { background: white; outline: none; border: none; padding: 0px; margin: 0px; overflow: auto; font-family: monospace; font-size: 110%; color: #000; width: auto }
.completions select option.context { color: #286090 }
#kernel_logo_widget { float: right }
#kernel_logo_widget .current_kernel_logo { display: none; margin-top: -1px; margin-bottom: -1px; width: 32px; height: 32px }
#menubar { margin-top: 1px }
#menubar .navbar { border-top: 1px; margin-bottom: 0px }
#menubar .navbar-toggle { float: left; padding-top: 7px; padding-bottom: 7px; border: none }
#menubar .navbar-collapse { clear: left }
.nav-wrapper { border-bottom: 1px solid #e7e7e7 }
i.menu-icon { padding-top: 4px }
ul#help_menu li a { overflow: hidden; padding-right: 2.2em }
ul#help_menu li a i { margin-right: -1.2em }
.dropdown-submenu { position: relative }
.dropdown-submenu>.dropdown-menu { top: 0; left: 100%; margin-top: -6px; margin-left: -1px }
.dropdown-submenu:hover>.dropdown-menu { display: block }
.dropdown-submenu>a::after { font: normal normal normal 14px/1 FontAwesome; font-size: inherit; display: block; content: "?"; float: right; color: #333333; margin-top: 2px; margin-right: -10px }
.dropdown-submenu>a::after.pull-left { margin-right: .3em }
.dropdown-submenu>a::after.pull-right { margin-left: .3em }
.dropdown-submenu:hover>a::after { color: #262626 }
.dropdown-submenu.pull-left { float: none }
.dropdown-submenu.pull-left>.dropdown-menu { left: -100%; margin-left: 10px }
#notification_area { float: right; z-index: 10 }
.indicator_area { float: right; color: #777; margin-left: 5px; margin-right: 5px; z-index: 10; text-align: center; width: auto }
#kernel_indicator { float: right; color: #777; margin-left: 5px; margin-right: 5px; z-index: 10; text-align: center; width: auto; border-left: 1px solid }
#kernel_indicator .kernel_indicator_name { padding-left: 5px; padding-right: 5px }
#modal_indicator { float: right; color: #777; margin-left: 5px; margin-right: 5px; z-index: 10; text-align: center; width: auto }
#readonly-indicator { float: right; color: #777; z-index: 10; text-align: center; width: auto; margin-top: 2px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; display: none }
.modal_indicator::before { width: 1.28571429em; text-align: center }
.edit_mode .modal_indicator::before { display: inline-block; font: normal normal normal 14px/1 FontAwesome; font-size: inherit; content: "?" }
.edit_mode .modal_indicator::before.pull-left { margin-right: .3em }
.edit_mode .modal_indicator::before.pull-right { margin-left: .3em }
.command_mode .modal_indicator::before { display: inline-block; font: normal normal normal 14px/1 FontAwesome; font-size: inherit; content: " " }
.command_mode .modal_indicator::before.pull-left { margin-right: .3em }
.command_mode .modal_indicator::before.pull-right { margin-left: .3em }
.kernel_idle_icon::before { display: inline-block; font: normal normal normal 14px/1 FontAwesome; font-size: inherit; content: "?" }
.kernel_idle_icon::before.pull-left { margin-right: .3em }
.kernel_idle_icon::before.pull-right { margin-left: .3em }
.kernel_busy_icon::before { display: inline-block; font: normal normal normal 14px/1 FontAwesome; font-size: inherit; content: "?" }
.kernel_busy_icon::before.pull-left { margin-right: .3em }
.kernel_busy_icon::before.pull-right { margin-left: .3em }
.kernel_dead_icon::before { display: inline-block; font: normal normal normal 14px/1 FontAwesome; font-size: inherit; content: "?" }
.kernel_dead_icon::before.pull-left { margin-right: .3em }
.kernel_dead_icon::before.pull-right { margin-left: .3em }
.kernel_disconnected_icon::before { display: inline-block; font: normal normal normal 14px/1 FontAwesome; font-size: inherit; content: "?" }
.kernel_disconnected_icon::before.pull-left { margin-right: .3em }
.kernel_disconnected_icon::before.pull-right { margin-left: .3em }
.notification_widget { z-index: 10; background: rgba(240, 240, 240, 0.5); margin-right: 4px; color: #333; background-color: #fff; border-color: #ccc }
.notification_widget:focus,.notification_widget.focus { color: #333; background-color: #e6e6e6; border-color: #8c8c8c }
.notification_widget:hover { color: #333; background-color: #e6e6e6; border-color: #adadad }
.notification_widget:active,.notification_widget.active,.open>.dropdown-toggle.notification_widget { color: #333; background-color: #e6e6e6; border-color: #adadad }
.notification_widget:active:hover,.notification_widget.active:hover,.open>.dropdown-toggle.notification_widget:hover,.notification_widget:active:focus,.notification_widget.active:focus,.open>.dropdown-toggle.notification_widget:focus,.notification_widget:active.focus,.notification_widget.active.focus,.open>.dropdown-toggle.notification_widget.focus { color: #333; background-color: #d4d4d4; border-color: #8c8c8c }
.notification_widget:active,.notification_widget.active,.open>.dropdown-toggle.notification_widget { background-image: none }
.notification_widget.disabled:hover,.notification_widget[disabled]:hover,fieldset[disabled] .notification_widget:hover,.notification_widget.disabled:focus,.notification_widget[disabled]:focus,fieldset[disabled] .notification_widget:focus,.notification_widget.disabled.focus,.notification_widget[disabled].focus,fieldset[disabled] .notification_widget.focus { background-color: #fff; border-color: #ccc }
.notification_widget .badge { color: #fff; background-color: #333 }
.notification_widget.warning { color: #fff; background-color: #f0ad4e; border-color: #eea236 }
.notification_widget.warning:focus,.notification_widget.warning.focus { color: #fff; background-color: #ec971f; border-color: #985f0d }
.notification_widget.warning:hover { color: #fff; background-color: #ec971f; border-color: #d58512 }
.notification_widget.warning:active,.notification_widget.warning.active,.open>.dropdown-toggle.notification_widget.warning { color: #fff; background-color: #ec971f; border-color: #d58512 }
.notification_widget.warning:active:hover,.notification_widget.warning.active:hover,.open>.dropdown-toggle.notification_widget.warning:hover,.notification_widget.warning:active:focus,.notification_widget.warning.active:focus,.open>.dropdown-toggle.notification_widget.warning:focus,.notification_widget.warning:active.focus,.notification_widget.warning.active.focus,.open>.dropdown-toggle.notification_widget.warning.focus { color: #fff; background-color: #d58512; border-color: #985f0d }
.notification_widget.warning:active,.notification_widget.warning.active,.open>.dropdown-toggle.notification_widget.warning { background-image: none }
.notification_widget.warning.disabled:hover,.notification_widget.warning[disabled]:hover,fieldset[disabled] .notification_widget.warning:hover,.notification_widget.warning.disabled:focus,.notification_widget.warning[disabled]:focus,fieldset[disabled] .notification_widget.warning:focus,.notification_widget.warning.disabled.focus,.notification_widget.warning[disabled].focus,fieldset[disabled] .notification_widget.warning.focus { background-color: #f0ad4e; border-color: #eea236 }
.notification_widget.warning .badge { color: #f0ad4e; background-color: #fff }
.notification_widget.success { color: #fff; background-color: #5cb85c; border-color: #4cae4c }
.notification_widget.success:focus,.notification_widget.success.focus { color: #fff; background-color: #449d44; border-color: #255625 }
.notification_widget.success:hover { color: #fff; background-color: #449d44; border-color: #398439 }
.notification_widget.success:active,.notification_widget.success.active,.open>.dropdown-toggle.notification_widget.success { color: #fff; background-color: #449d44; border-color: #398439 }
.notification_widget.success:active:hover,.notification_widget.success.active:hover,.open>.dropdown-toggle.notification_widget.success:hover,.notification_widget.success:active:focus,.notification_widget.success.active:focus,.open>.dropdown-toggle.notification_widget.success:focus,.notification_widget.success:active.focus,.notification_widget.success.active.focus,.open>.dropdown-toggle.notification_widget.success.focus { color: #fff; background-color: #398439; border-color: #255625 }
.notification_widget.success:active,.notification_widget.success.active,.open>.dropdown-toggle.notification_widget.success { background-image: none }
.notification_widget.success.disabled:hover,.notification_widget.success[disabled]:hover,fieldset[disabled] .notification_widget.success:hover,.notification_widget.success.disabled:focus,.notification_widget.success[disabled]:focus,fieldset[disabled] .notification_widget.success:focus,.notification_widget.success.disabled.focus,.notification_widget.success[disabled].focus,fieldset[disabled] .notification_widget.success.focus { background-color: #5cb85c; border-color: #4cae4c }
.notification_widget.success .badge { color: #5cb85c; background-color: #fff }
.notification_widget.info { color: #fff; background-color: #5bc0de; border-color: #46b8da }
.notification_widget.info:focus,.notification_widget.info.focus { color: #fff; background-color: #31b0d5; border-color: #1b6d85 }
.notification_widget.info:hover { color: #fff; background-color: #31b0d5; border-color: #269abc }
.notification_widget.info:active,.notification_widget.info.active,.open>.dropdown-toggle.notification_widget.info { color: #fff; background-color: #31b0d5; border-color: #269abc }
.notification_widget.info:active:hover,.notification_widget.info.active:hover,.open>.dropdown-toggle.notification_widget.info:hover,.notification_widget.info:active:focus,.notification_widget.info.active:focus,.open>.dropdown-toggle.notification_widget.info:focus,.notification_widget.info:active.focus,.notification_widget.info.active.focus,.open>.dropdown-toggle.notification_widget.info.focus { color: #fff; background-color: #269abc; border-color: #1b6d85 }
.notification_widget.info:active,.notification_widget.info.active,.open>.dropdown-toggle.notification_widget.info { background-image: none }
.notification_widget.info.disabled:hover,.notification_widget.info[disabled]:hover,fieldset[disabled] .notification_widget.info:hover,.notification_widget.info.disabled:focus,.notification_widget.info[disabled]:focus,fieldset[disabled] .notification_widget.info:focus,.notification_widget.info.disabled.focus,.notification_widget.info[disabled].focus,fieldset[disabled] .notification_widget.info.focus { background-color: #5bc0de; border-color: #46b8da }
.notification_widget.info .badge { color: #5bc0de; background-color: #fff }
.notification_widget.danger { color: #fff; background-color: #d9534f; border-color: #d43f3a }
.notification_widget.danger:focus,.notification_widget.danger.focus { color: #fff; background-color: #c9302c; border-color: #761c19 }
.notification_widget.danger:hover { color: #fff; background-color: #c9302c; border-color: #ac2925 }
.notification_widget.danger:active,.notification_widget.danger.active,.open>.dropdown-toggle.notification_widget.danger { color: #fff; background-color: #c9302c; border-color: #ac2925 }
.notification_widget.danger:active:hover,.notification_widget.danger.active:hover,.open>.dropdown-toggle.notification_widget.danger:hover,.notification_widget.danger:active:focus,.notification_widget.danger.active:focus,.open>.dropdown-toggle.notification_widget.danger:focus,.notification_widget.danger:active.focus,.notification_widget.danger.active.focus,.open>.dropdown-toggle.notification_widget.danger.focus { color: #fff; background-color: #ac2925; border-color: #761c19 }
.notification_widget.danger:active,.notification_widget.danger.active,.open>.dropdown-toggle.notification_widget.danger { background-image: none }
.notification_widget.danger.disabled:hover,.notification_widget.danger[disabled]:hover,fieldset[disabled] .notification_widget.danger:hover,.notification_widget.danger.disabled:focus,.notification_widget.danger[disabled]:focus,fieldset[disabled] .notification_widget.danger:focus,.notification_widget.danger.disabled.focus,.notification_widget.danger[disabled].focus,fieldset[disabled] .notification_widget.danger.focus { background-color: #d9534f; border-color: #d43f3a }
.notification_widget.danger .badge { color: #d9534f; background-color: #fff }
div#pager { background-color: #fff; font-size: 14px; line-height: 20px; overflow: hidden; display: none; position: fixed; bottom: 0px; width: 100%; max-height: 50%; padding-top: 8px; z-index: 100; top: auto !important }
div#pager pre { line-height: 1.21429em; color: #000; background-color: #f7f7f7; padding: 0.4em }
div#pager #pager-button-area { position: absolute; top: 8px; right: 20px }
div#pager #pager-contents { position: relative; overflow: auto; width: 100%; height: 100% }
div#pager #pager-contents #pager-container { position: relative; padding: 15px 0px }
div#pager .ui-resizable-handle { top: 0px; height: 8px; background: #f7f7f7; border-top: 1px solid #cfcfcf; border-bottom: 1px solid #cfcfcf }
div#pager .ui-resizable-handle::after { content: ""; top: 2px; left: 50%; height: 3px; width: 30px; margin-left: -15px; position: absolute; border-top: 1px solid #cfcfcf }
.quickhelp { display: flex; line-height: 1.8em }
.shortcut_key { display: inline-block; width: 21ex; text-align: right; font-family: monospace }
.shortcut_descr { display: inline-block }
span.save_widget { margin-top: 6px }
span.save_widget span.filename { height: 1em; line-height: 1em; padding: 3px; margin-left: 16px; border: none; font-size: 146.5% }
span.save_widget span.filename:hover { background-color: #e6e6e6 }
span.checkpoint_status,span.autosave_status { font-size: small }
.toolbar { padding: 0px; margin-left: -5px; margin-top: 2px; margin-bottom: 5px }
.toolbar select,.toolbar label { width: auto; vertical-align: middle; margin-bottom: 0px; display: inline; font-size: 92%; margin-left: 0.3em; margin-right: 0.3em; padding: 0px; padding-top: 3px }
.toolbar .btn { padding: 2px 8px }
.toolbar .btn-group { margin-top: 0px; margin-left: 5px }
#maintoolbar { margin-bottom: -3px; margin-top: -8px; border: 0px; min-height: 27px; margin-left: 0px; padding-top: 11px; padding-bottom: 3px }
#maintoolbar .navbar-text { float: none; vertical-align: middle; text-align: right; margin-left: 5px; margin-right: 0px; margin-top: 0px }
.select-xs { height: 24px }
.pulse,.dropdown-menu>li>a.pulse,li.pulse>a.dropdown-toggle,li.pulse.open>a.dropdown-toggle { background-color: #F37626; color: white }
.bigtooltip { overflow: auto; height: 200px }
.smalltooltip { overflow: hidden; height: 80px }
.tooltipbuttons { position: absolute; padding-right: 15px; top: 0px; right: 0px }
.tooltiptext { padding-right: 30px }
.ipython_tooltip { max-width: 700px; vertical-align: middle; background-color: #f7f7f7; overflow: visible; border: #ababab 1px solid; outline: none; padding: 3px; margin: 0px; padding-left: 7px; font-family: monospace; min-height: 50px; position: absolute; z-index: 1000 }
.ipython_tooltip a { float: right }
.ipython_tooltip .tooltiptext pre { border: 0; font-size: 100%; background-color: #f7f7f7 }
.pretooltiparrow { left: 0px; margin: 0px; top: -16px; width: 40px; height: 16px; overflow: hidden; position: absolute }
.pretooltiparrow::before { background-color: #f7f7f7; border: 1px #ababab solid; z-index: 11; content: ""; position: absolute; left: 15px; top: 10px; width: 25px; height: 25px }
ul.typeahead-list i { margin-left: -10px; width: 18px }
ul.typeahead-list { max-height: 80vh; overflow: auto }
ul.typeahead-list>li>a { white-space: normal }
.cmd-palette .modal-body { padding: 7px }
.cmd-palette form { background: white }
.cmd-palette input { outline: none }
.no-shortcut { display: none }
.command-shortcut::before { content: "(command)"; padding-right: 3px; color: #777777 }
.edit-shortcut::before { content: "(edit)"; padding-right: 3px; color: #777777 }
#find-and-replace #replace-preview .match,#find-and-replace #replace-preview .insert { background-color: #BBDEFB; border-color: #90CAF9; border-style: solid; border-width: 1px }
#find-and-replace #replace-preview .replace .match { background-color: #FFCDD2; border-color: #EF9A9A }
#find-and-replace #replace-preview .replace .insert { background-color: #C8E6C9; border-color: #A5D6A7 }
#find-and-replace #replace-preview { max-height: 60vh; overflow: auto }
#find-and-replace #replace-preview pre { padding: 5px 10px }
.terminal-app { background: #EEE }
.terminal-app #header { background: #fff }
.terminal-app .terminal { width: 100%; float: left; font-family: monospace; color: white; background: black; padding: 0.4em }
.terminal-app .terminal,.terminal-app .terminal dummy-screen { line-height: 1em; font-size: 14px }
.terminal-app .terminal .xterm-rows { padding: 10px }
.terminal-app .terminal-cursor { color: black; background: white }
.terminal-app #terminado-container { margin-top: 20px }
.highlight .hll { background-color: #ffffcc }
.highlight { background: #f8f8f8 }
.highlight .c { color: #408080; font-style: italic }
.highlight .err { border: 1px solid #FF0000 }
.highlight .k { color: #008000; font-weight: bold }
.highlight .o { color: #666666 }
.highlight .ch { color: #408080; font-style: italic }
.highlight .cm { color: #408080; font-style: italic }
.highlight .cp { color: #BC7A00 }
.highlight .cpf { color: #408080; font-style: italic }
.highlight .c1 { color: #408080; font-style: italic }
.highlight .cs { color: #408080; font-style: italic }
.highlight .gd { color: #A00000 }
.highlight .ge { font-style: italic }
.highlight .gr { color: #FF0000 }
.highlight .gh { color: #000080; font-weight: bold }
.highlight .gi { color: #00A000 }
.highlight .go { color: #888888 }
.highlight .gp { color: #000080; font-weight: bold }
.highlight .gs { font-weight: bold }
.highlight .gu { color: #800080; font-weight: bold }
.highlight .gt { color: #0044DD }
.highlight .kc { color: #008000; font-weight: bold }
.highlight .kd { color: #008000; font-weight: bold }
.highlight .kn { color: #008000; font-weight: bold }
.highlight .kp { color: #008000 }
.highlight .kr { color: #008000; font-weight: bold }
.highlight .kt { color: #B00040 }
.highlight .m { color: #666666 }
.highlight .s { color: #BA2121 }
.highlight .na { color: #7D9029 }
.highlight .nb { color: #008000 }
.highlight .nc { color: #0000FF; font-weight: bold }
.highlight .no { color: #880000 }
.highlight .nd { color: #AA22FF }
.highlight .ni { color: #999999; font-weight: bold }
.highlight .ne { color: #D2413A; font-weight: bold }
.highlight .nf { color: #0000FF }
.highlight .nl { color: #A0A000 }
.highlight .nn { color: #0000FF; font-weight: bold }
.highlight .nt { color: #008000; font-weight: bold }
.highlight .nv { color: #19177C }
.highlight .ow { color: #AA22FF; font-weight: bold }
.highlight .w { color: #bbbbbb }
.highlight .mb { color: #666666 }
.highlight .mf { color: #666666 }
.highlight .mh { color: #666666 }
.highlight .mi { color: #666666 }
.highlight .mo { color: #666666 }
.highlight .sa { color: #BA2121 }
.highlight .sb { color: #BA2121 }
.highlight .sc { color: #BA2121 }
.highlight .dl { color: #BA2121 }
.highlight .sd { color: #BA2121; font-style: italic }
.highlight .s2 { color: #BA2121 }
.highlight .se { color: #BB6622; font-weight: bold }
.highlight .sh { color: #BA2121 }
.highlight .si { color: #BB6688; font-weight: bold }
.highlight .sx { color: #008000 }
.highlight .sr { color: #BB6688 }
.highlight .s1 { color: #BA2121 }
.highlight .ss { color: #19177C }
.highlight .bp { color: #008000 }
.highlight .fm { color: #0000FF }
.highlight .vc { color: #19177C }
.highlight .vg { color: #19177C }
.highlight .vi { color: #19177C }
.highlight .vm { color: #19177C }
.highlight .il { color: #666666 }
.ansi-black-fg { color: #3E424D }
.ansi-black-bg { background-color: #3E424D }
.ansi-black-intense-fg { color: #282C36 }
.ansi-black-intense-bg { background-color: #282C36 }
.ansi-red-fg { color: #E75C58 }
.ansi-red-bg { background-color: #E75C58 }
.ansi-red-intense-fg { color: #B22B31 }
.ansi-red-intense-bg { background-color: #B22B31 }
.ansi-green-fg { color: #00A250 }
.ansi-green-bg { background-color: #00A250 }
.ansi-green-intense-fg { color: #007427 }
.ansi-green-intense-bg { background-color: #007427 }
.ansi-yellow-fg { color: #DDB62B }
.ansi-yellow-bg { background-color: #DDB62B }
.ansi-yellow-intense-fg { color: #B27D12 }
.ansi-yellow-intense-bg { background-color: #B27D12 }
.ansi-blue-fg { color: #208FFB }
.ansi-blue-bg { background-color: #208FFB }
.ansi-blue-intense-fg { color: #0065CA }
.ansi-blue-intense-bg { background-color: #0065CA }
.ansi-magenta-fg { color: #D160C4 }
.ansi-magenta-bg { background-color: #D160C4 }
.ansi-magenta-intense-fg { color: #A03196 }
.ansi-magenta-intense-bg { background-color: #A03196 }
.ansi-cyan-fg { color: #60C6C8 }
.ansi-cyan-bg { background-color: #60C6C8 }
.ansi-cyan-intense-fg { color: #258F8F }
.ansi-cyan-intense-bg { background-color: #258F8F }
.ansi-white-fg { color: #C5C1B4 }
.ansi-white-bg { background-color: #C5C1B4 }
.ansi-white-intense-fg { color: #A1A6B2 }
.ansi-white-intense-bg { background-color: #A1A6B2 }
.ansi-bold { font-weight: bold }

body { overflow: visible; padding: 8px }
div#notebook { overflow: visible; border-top: none }

In [1]:

# from http://pandas.pydata.org/pandas-docs/stable/indexing.html
# pandas 0.22.0

In [2]:

import pandas as pd
import numpy as np

In [3]:

"""
尽量利用pandas提供的专用索引方式,而不是python通用的切片方式。
三种主要的索引方式:indexers
.loc label based 基于标签, 可以是标签名,可以是布尔值,可以是一元函数
.iloc integer psition based 基于整数位置(from 0 to length-1 of the axis),和python切片类似
[]

"""

"""
Object Type 		Selection 			Return Value Type
------------------------------------------------------------
Series 				series[label] 		scalar value
DataFrame 			frame[colname] 		Series corresponding to colname
Panel 				panel[itemname] 	DataFrame corresponding to the itemname
"""

Out[3]:

‘\n尽量利用pandas提供的专用索引方式,而不是python通用的切片方式。\n三种主要的索引方式:indexers\n.loc label based 基于标签, 可以是标签名,可以是布尔值,可以是一元函数\n.iloc integer psition based 基于整数位置(from 0 to length-1 of the axis),和python切片类似\n[]\n\n‘

Out[3]:

‘\nObject Type \t\tIndexers\nSeries \t\t\t\ts.loc[indexer]\nDataFrame \t\t\tdf.loc[row_indexer,column_indexer]\nPanel \t\t\t\tp.loc[item_indexer,major_indexer,minor_indexer]\n‘

In [5]:

# Here we construct a simple time series data set to use for illustrating the indexing functionality
# 构造时间序列,举例说明索引的功能

dates = pd.date_range(‘1/1/2000‘, periods=8)
dates
df = pd.DataFrame(np.random.randn(8, 4), index=dates, columns=[‘A‘, ‘B‘, ‘C‘, ‘D‘])
df

Out[5]:

DatetimeIndex([‘2000-01-01‘, ‘2000-01-02‘, ‘2000-01-03‘, ‘2000-01-04‘,
               ‘2000-01-05‘, ‘2000-01-06‘, ‘2000-01-07‘, ‘2000-01-08‘],
              dtype=‘datetime64[ns]‘, freq=‘D‘)

Out[5]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D
2000-01-01 0.136628 0.324097 0.856313 -0.145259
2000-01-02 0.113819 -0.718630 0.016217 -1.571263
2000-01-03 -0.603598 -0.143643 -1.143063 -0.425266
2000-01-04 -0.486200 -0.136663 -2.016020 -0.815514
2000-01-05 0.835318 1.036607 -0.502919 0.878680
2000-01-06 -2.376205 0.362577 -0.484754 -0.478711
2000-01-07 0.193371 1.330468 0.544160 1.030900
2000-01-08 0.476533 -0.476653 -0.434356 0.744500

In [8]:

panel = pd.Panel({‘one‘ : df, ‘two‘ : df - df.mean()})  # 多维表格
panel
panel[‘one‘]
panel[‘two‘]

Out[8]:

<class ‘pandas.core.panel.Panel‘>
Dimensions: 2 (items) x 8 (major_axis) x 4 (minor_axis)
Items axis: one to two
Major_axis axis: 2000-01-01 00:00:00 to 2000-01-08 00:00:00
Minor_axis axis: A to D

Out[8]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D
2000-01-01 0.136628 0.324097 0.856313 -0.145259
2000-01-02 0.113819 -0.718630 0.016217 -1.571263
2000-01-03 -0.603598 -0.143643 -1.143063 -0.425266
2000-01-04 -0.486200 -0.136663 -2.016020 -0.815514
2000-01-05 0.835318 1.036607 -0.502919 0.878680
2000-01-06 -2.376205 0.362577 -0.484754 -0.478711
2000-01-07 0.193371 1.330468 0.544160 1.030900
2000-01-08 0.476533 -0.476653 -0.434356 0.744500

Out[8]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D
2000-01-01 0.350419 0.126827 1.251866 -0.047518
2000-01-02 0.327611 -0.915900 0.411770 -1.473522
2000-01-03 -0.389806 -0.340913 -0.747511 -0.327524
2000-01-04 -0.272408 -0.333933 -1.620467 -0.717772
2000-01-05 1.049110 0.839337 -0.107366 0.976422
2000-01-06 -2.162413 0.165307 -0.089201 -0.380969
2000-01-07 0.407163 1.133198 0.939713 1.128641
2000-01-08 0.690325 -0.673923 -0.038803 0.842241

In [9]:

# Thus, as per above, we have the most basic indexing using []:
# 最基本的索引方法,使用[]

s = df[‘A‘]
s
dates[5]  # 注意切片从0计数
s[dates[5]]

Out[9]:

2000-01-01    0.136628
2000-01-02    0.113819
2000-01-03   -0.603598
2000-01-04   -0.486200
2000-01-05    0.835318
2000-01-06   -2.376205
2000-01-07    0.193371
2000-01-08    0.476533
Freq: D, Name: A, dtype: float64

Out[9]:

Timestamp(‘2000-01-06 00:00:00‘, freq=‘D‘)

Out[9]:

-2.376204948581219

In [12]:

# 在[]中传入列名的列表,如[ ‘A‘, "B" ]
columns_l = [‘A‘, ‘B‘]
df[columns_l]
df[[ ‘A‘, "B" ]]  # 相当于上面,注意两重[]
df

Out[12]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B
2000-01-01 0.324097 0.136628
2000-01-02 -0.718630 0.113819
2000-01-03 -0.143643 -0.603598
2000-01-04 -0.136663 -0.486200
2000-01-05 1.036607 0.835318
2000-01-06 0.362577 -2.376205
2000-01-07 1.330468 0.193371
2000-01-08 -0.476653 0.476533

Out[12]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B
2000-01-01 0.324097 0.136628
2000-01-02 -0.718630 0.113819
2000-01-03 -0.143643 -0.603598
2000-01-04 -0.136663 -0.486200
2000-01-05 1.036607 0.835318
2000-01-06 0.362577 -2.376205
2000-01-07 1.330468 0.193371
2000-01-08 -0.476653 0.476533

Out[12]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D
2000-01-01 0.324097 0.136628 0.856313 -0.145259
2000-01-02 -0.718630 0.113819 0.016217 -1.571263
2000-01-03 -0.143643 -0.603598 -1.143063 -0.425266
2000-01-04 -0.136663 -0.486200 -2.016020 -0.815514
2000-01-05 1.036607 0.835318 -0.502919 0.878680
2000-01-06 0.362577 -2.376205 -0.484754 -0.478711
2000-01-07 1.330468 0.193371 0.544160 1.030900
2000-01-08 -0.476653 0.476533 -0.434356 0.744500

In [17]:

df[[‘A‘, ‘B‘]] = df[[‘B‘, ‘A‘]]  # 交换两列的值
df
df.loc[:,[‘B‘, ‘A‘]]

# 下式不能交换两列的值
# This will not modify df because the column alignment is before value assignment. ? 不理解?
# 列赋值在值赋值之前?
df.loc[:,[‘B‘, ‘A‘]] = df[[‘A‘, ‘B‘]]
df

# df.loc[:,[‘B‘, ‘A‘]] = df[:, [‘A‘, ‘B‘]]   # 错误?
# df

# 正确的方式:
df.loc[:,[‘B‘, ‘A‘]] = df[[‘A‘, ‘B‘]].values  # 取列的值
df

Out[17]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D
2000-01-01 0.136628 0.324097 0.856313 -0.145259
2000-01-02 0.113819 -0.718630 0.016217 -1.571263
2000-01-03 -0.603598 -0.143643 -1.143063 -0.425266
2000-01-04 -0.486200 -0.136663 -2.016020 -0.815514
2000-01-05 0.835318 1.036607 -0.502919 0.878680
2000-01-06 -2.376205 0.362577 -0.484754 -0.478711
2000-01-07 0.193371 1.330468 0.544160 1.030900
2000-01-08 0.476533 -0.476653 -0.434356 0.744500

Out[17]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  B A
2000-01-01 0.324097 0.136628
2000-01-02 -0.718630 0.113819
2000-01-03 -0.143643 -0.603598
2000-01-04 -0.136663 -0.486200
2000-01-05 1.036607 0.835318
2000-01-06 0.362577 -2.376205
2000-01-07 1.330468 0.193371
2000-01-08 -0.476653 0.476533

Out[17]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D
2000-01-01 0.136628 0.324097 0.856313 -0.145259
2000-01-02 0.113819 -0.718630 0.016217 -1.571263
2000-01-03 -0.603598 -0.143643 -1.143063 -0.425266
2000-01-04 -0.486200 -0.136663 -2.016020 -0.815514
2000-01-05 0.835318 1.036607 -0.502919 0.878680
2000-01-06 -2.376205 0.362577 -0.484754 -0.478711
2000-01-07 0.193371 1.330468 0.544160 1.030900
2000-01-08 0.476533 -0.476653 -0.434356 0.744500

Out[17]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D
2000-01-01 0.324097 0.136628 0.856313 -0.145259
2000-01-02 -0.718630 0.113819 0.016217 -1.571263
2000-01-03 -0.143643 -0.603598 -1.143063 -0.425266
2000-01-04 -0.136663 -0.486200 -2.016020 -0.815514
2000-01-05 1.036607 0.835318 -0.502919 0.878680
2000-01-06 0.362577 -2.376205 -0.484754 -0.478711
2000-01-07 1.330468 0.193371 0.544160 1.030900
2000-01-08 -0.476653 0.476533 -0.434356 0.744500

In [18]:

# Attribute Access?
# 属性访问,属性存取
# You may access an index on a Series, column on a DataFrame,
# and an item on a Panel directly as an attribute:

sa = pd.Series([1,2,3],index=list(‘abc‘))
sa

dfa = df.copy()
dfa

Out[18]:

a    1
b    2
c    3
dtype: int64

Out[18]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D
2000-01-01 0.324097 0.136628 0.856313 -0.145259
2000-01-02 -0.718630 0.113819 0.016217 -1.571263
2000-01-03 -0.143643 -0.603598 -1.143063 -0.425266
2000-01-04 -0.136663 -0.486200 -2.016020 -0.815514
2000-01-05 1.036607 0.835318 -0.502919 0.878680
2000-01-06 0.362577 -2.376205 -0.484754 -0.478711
2000-01-07 1.330468 0.193371 0.544160 1.030900
2000-01-08 -0.476653 0.476533 -0.434356 0.744500

In [20]:

# 对item column等赋值
# 就像属性一样的存取,但需要注意:
# 1. 名称应符合python命名规则,由字母、数字和下划线组成
# 2. 不能和已有的方法名称重名,例如 min
# 3. 不能与pandas内部“关键字”重名,例如 index axis items labels
# 以上情况,可以使用 [ "" ] 引用

sa.a = 5
sa

dfa.index
dfa.A = list(range(len(dfa.index)))
dfa

Out[20]:

a    5
b    2
c    3
dtype: int64

Out[20]:

DatetimeIndex([‘2000-01-01‘, ‘2000-01-02‘, ‘2000-01-03‘, ‘2000-01-04‘,
               ‘2000-01-05‘, ‘2000-01-06‘, ‘2000-01-07‘, ‘2000-01-08‘],
              dtype=‘datetime64[ns]‘, freq=‘D‘)

Out[20]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D
2000-01-01 0 0.136628 0.856313 -0.145259
2000-01-02 1 0.113819 0.016217 -1.571263
2000-01-03 2 -0.603598 -1.143063 -0.425266
2000-01-04 3 -0.486200 -2.016020 -0.815514
2000-01-05 4 0.835318 -0.502919 0.878680
2000-01-06 5 -2.376205 -0.484754 -0.478711
2000-01-07 6 0.193371 0.544160 1.030900
2000-01-08 7 0.476533 -0.434356 0.744500

In [21]:

x = pd.DataFrame({‘x‘: [1, 2, 3], ‘y‘: [3, 4, 5]})  # 字典key值为列名
x

Out[21]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  x y
0 1 3
1 2 4
2 3 5

In [24]:

dict(x=9, y=99)
x.iloc[1]
x.iloc[1] = dict(x=9, y=99)
x

Out[24]:

{‘x‘: 9, ‘y‘: 99}

Out[24]:

x    2
y    4
Name: 1, dtype: int64

Out[24]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  x y
0 1 3
1 9 99
2 3 5

In [29]:

df = pd.DataFrame({‘one‘: [1., 2., 3.]})
df
df.two = [4, 5, 6]  # 错误,不能增加一列,利用属性的方式不能对没有的列赋值
df.two  # 但是增加了一项属性,而且可以取得这项属性
df
df[‘two‘] = [4, 5, 6]  # 可以增加一列
df

Out[29]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  one
0 1.0
1 2.0
2 3.0
d:\python\36-64\lib\site-packages\ipykernel_launcher.py:3: UserWarning: Pandas doesn‘t allow columns to be created via a new attribute name - see https://pandas.pydata.org/pandas-docs/stable/indexing.html#attribute-access
  This is separate from the ipykernel package so we can avoid doing imports until

Out[29]:

[4, 5, 6]

Out[29]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  one
0 1.0
1 2.0
2 3.0

Out[29]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  one two
0 1.0 4
1 2.0 5
2 3.0 6

In [31]:

# Slicing ranges
# 切片范围
# iloc 方法是最稳健和兼容的
# 下面介绍 方括号 [] 操作符 作为切片

# 对series操作
# 取值
s
s[:5]
s[::2]
s[::-1]

Out[31]:

2000-01-01    0.324097
2000-01-02   -0.718630
2000-01-03   -0.143643
2000-01-04   -0.136663
2000-01-05    1.036607
2000-01-06    0.362577
2000-01-07    1.330468
2000-01-08   -0.476653
Freq: D, Name: A, dtype: float64

Out[31]:

2000-01-01    0.324097
2000-01-02   -0.718630
2000-01-03   -0.143643
2000-01-04   -0.136663
2000-01-05    1.036607
Freq: D, Name: A, dtype: float64

Out[31]:

2000-01-01    0.324097
2000-01-03   -0.143643
2000-01-05    1.036607
2000-01-07    1.330468
Freq: 2D, Name: A, dtype: float64

Out[31]:

2000-01-08   -0.476653
2000-01-07    1.330468
2000-01-06    0.362577
2000-01-05    1.036607
2000-01-04   -0.136663
2000-01-03   -0.143643
2000-01-02   -0.718630
2000-01-01    0.324097
Freq: -1D, Name: A, dtype: float64

In [33]:

# 赋值
s2 = s.copy()
s2
s2[:5] = 0
s2

Out[33]:

2000-01-01    0.324097
2000-01-02   -0.718630
2000-01-03   -0.143643
2000-01-04   -0.136663
2000-01-05    1.036607
2000-01-06    0.362577
2000-01-07    1.330468
2000-01-08   -0.476653
Freq: D, Name: A, dtype: float64

Out[33]:

2000-01-01    0.000000
2000-01-02    0.000000
2000-01-03    0.000000
2000-01-04    0.000000
2000-01-05    0.000000
2000-01-06    0.362577
2000-01-07    1.330468
2000-01-08   -0.476653
Freq: D, Name: A, dtype: float64

In [35]:

# 对DataFrame操作
# [] 操作 选择的是行
df
df[:3]
df[::-1]

Out[35]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  one two
0 1.0 4
1 2.0 5
2 3.0 6

Out[35]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  one two
0 1.0 4
1 2.0 5
2 3.0 6

Out[35]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  one two
2 3.0 6
1 2.0 5
0 1.0 4

In [49]:

# Selection By Label
# 通过标签选择

# 这种方式可能依靠上下文关系,有时候会调用链式赋值,这应该避免。参考:
# Returning a view versus a copy 返回视图 对比 拷贝

# When setting values in a pandas object,
# care must be taken to avoid what is called chained indexing.
# Here is an example.

[list(‘abcd‘),list(‘efgh‘),list(‘ijkl‘),list(‘mnop‘)]
[[‘one‘,‘two‘],[‘first‘,‘second‘]]

dfmi = pd.DataFrame([list(‘abcd‘),list(‘efgh‘),list(‘ijkl‘),list(‘mnop‘)],  # 定义四列数值
        columns=pd.MultiIndex.from_product(
         [[‘one‘,‘two‘],[‘first‘,‘second‘]])) # 定义多重索引,第一个list是第一层,以下类推

dfmi

Out[49]:

[[‘a‘, ‘b‘, ‘c‘, ‘d‘],
 [‘e‘, ‘f‘, ‘g‘, ‘h‘],
 [‘i‘, ‘j‘, ‘k‘, ‘l‘],
 [‘m‘, ‘n‘, ‘o‘, ‘p‘]]

Out[49]:

[[‘one‘, ‘two‘], [‘first‘, ‘second‘]]

Out[49]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead tr th { text-align: left }

  one two
  first second first second
0 a b c d
1 e f g h
2 i j k l
3 m n o p

In [50]:

#  Compare these two access methods:
dfmi[‘one‘][‘second‘]  # chained
dfmi.loc[:,(‘one‘,‘second‘)]

Out[50]:

0    b
1    f
2    j
3    n
Name: second, dtype: object

Out[50]:

0    b
1    f
2    j
3    n
Name: (one, second), dtype: object

In [40]:

# 两种方式分析

# 第一种方式:链式 使用两个 []
dfmi[‘one‘]  # 第一个[] 先生成了一个DataFrame
dfmi[‘one‘][‘second‘]  # pandas 把两个[] 作为分开的事件,他们执行分开的两步调用 __getitem__

Out[40]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  first second
0 a b
1 e f
2 i j
3 m n

In [53]:

# 第二种方式:loc
# 通过嵌套的元组切片
df_s = (slice(None), (‘one‘, ‘second‘))
dfmi.loc[df_s]  # 只调用了一次 __getitem__

Out[53]:

0    b
1    f
2    j
3    n
Name: (one, second), dtype: object

In [62]:

# Selection By Label
# 通过标签选择

# loc要注意索引的数据类型,必须与索引的数据类型一致才可以,
# 例如 datetimeIndex 中,使用loc[2:3] ,即整数型的slice 将会出现TypeError

dfl = pd.DataFrame(np.random.randn(5,4), columns=list(‘ABCD‘),
                   index=pd.date_range(‘20130101‘,periods=5))

dfl
# dfl.loc[2:3]  # 错误的loc
dfl.loc[‘20130102‘:‘20130104‘]  # 使用可转换为datetime的字符串
dfl.loc[‘20130202‘:‘20130204‘]  # 不报错,返回为空DataFrame
# dfl.loc[‘20130202‘]  # 报错,错误信息是index无此值
dfl.loc[‘20130104‘:‘20130114‘]  # 只返回存在的数据

Out[62]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D
2013-01-01 -0.887358 1.068362 0.551961 -0.378400
2013-01-02 1.239840 -0.986149 -0.880655 2.112731
2013-01-03 -0.785526 1.583703 -0.871005 -0.659880
2013-01-04 -1.267462 2.500886 -0.980569 1.308624
2013-01-05 -0.842107 -0.921086 1.020196 -0.055930

Out[62]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D
2013-01-02 1.239840 -0.986149 -0.880655 2.112731
2013-01-03 -0.785526 1.583703 -0.871005 -0.659880
2013-01-04 -1.267462 2.500886 -0.980569 1.308624

Out[62]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D

Out[62]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D
2013-01-04 -1.267462 2.500886 -0.980569 1.308624
2013-01-05 -0.842107 -0.921086 1.020196 -0.055930

In [64]:

# loc可以使用整数,但此时的整数不代表位置,而是label
# loc是基本的取值方法
# 给loc的输入,即在[]中的值,可以是:
# 1. 单独的label  e.g. 5 or ‘a
# 2. labels的list   [‘a‘, ‘b‘, ‘c‘]
# 3. slice对象  ‘a‘:‘f‘  !! 注意:与python的切片不同,pandas的切片包括开始和结尾,而python不包括结尾
# 4. 布尔值
# 5. 调用函数  [lambda df: df.A > 0, :]

# Series
s1 = pd.Series(np.random.randn(6),index=list(‘abcdef‘))
s1
s1.loc[‘c‘:]
s1.loc[‘b‘]
s1.loc[‘c‘:] = 0
s1

Out[64]:

a    0.796911
b   -1.341250
c    0.008152
d   -0.745881
e    0.674385
f    1.108411
dtype: float64

Out[64]:

c    0.008152
d   -0.745881
e    0.674385
f    1.108411
dtype: float64

Out[64]:

-1.3412499335785426

Out[64]:

a    0.796911
b   -1.341250
c    0.000000
d    0.000000
e    0.000000
f    0.000000
dtype: float64

In [65]:

# DataFrame
df1 = pd.DataFrame(np.random.randn(6,4),  # 6X4 阵列
                   index=list(‘abcdef‘),  # 索引
                   columns=list(‘ABCD‘))  # 行号
df1

Out[65]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D
a -1.912141 -0.835589 -0.188341 -1.024797
b -0.977498 -2.050214 0.355172 -0.291794
c -0.183401 -0.376330 -0.188848 -2.116438
d -1.008359 0.230593 -0.099235 -0.426229
e -0.027338 2.125459 0.066200 -0.247813
f -1.132103 1.945235 1.891179 1.549750

In [72]:

df1.loc[[‘a‘, ‘b‘, ‘d‘], :]  # 先是行label选择,再是列label选择
df1.loc[‘d‘:, ‘A‘:‘C‘]

# 取得 a cross section 截面,用单个的label,返回Series
# 以下三式等同
df1.loc[‘a‘]
df1.loc[‘a‘,:]
df1.xs(‘a‘)
type(df1.loc[‘a‘])

Out[72]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D
a -1.912141 -0.835589 -0.188341 -1.024797
b -0.977498 -2.050214 0.355172 -0.291794
d -1.008359 0.230593 -0.099235 -0.426229

Out[72]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C
d -1.008359 0.230593 -0.099235
e -0.027338 2.125459 0.066200
f -1.132103 1.945235 1.891179

Out[72]:

A   -1.912141
B   -0.835589
C   -0.188341
D   -1.024797
Name: a, dtype: float64

Out[72]:

A   -1.912141
B   -0.835589
C   -0.188341
D   -1.024797
Name: a, dtype: float64

Out[72]:

A   -1.912141
B   -0.835589
C   -0.188341
D   -1.024797
Name: a, dtype: float64

Out[72]:

pandas.core.series.Series

In [73]:

# 通过布尔值数组取值
df1.loc[‘a‘] > 0
df1.loc[:, df1.loc[‘a‘] > 0]

Out[73]:

A    False
B    False
C    False
D    False
Name: a, dtype: bool

Out[73]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

 
a
b
c
d
e
f

In [74]:

# 获取一个值
# this is also equivalent to ``df1.at[‘a‘,‘A‘]``
df1.loc[‘a‘, ‘A‘]
df1.at[‘a‘,‘A‘]

Out[74]:

-1.9121410098540752

Out[74]:

-1.9121410098540752

In [75]:

# Slicing with labels?
# 用labels切片
s = pd.Series(list(‘abcde‘), index=[0,3,2,5,4])
s
s.loc[3:5]  # 包含 5, 注意不是 3 4 5 ,而是从 标签3 到 标签5

Out[75]:

0    a
3    b
2    c
5    d
4    e
dtype: object

Out[75]:

3    b
2    c
5    d
dtype: object

In [80]:

# s.loc[3:6]  # 2个错误,ValueError: index must be monotonic increasing or decreasing  KeyError: 6
# 如果排序的话,可以超出范围
s.sort_index()  # 不改变原值
s
s.sort_index().loc[1:6]  # 可以超出范围
s.sort_index().loc[6:8]  # 即使一个都没有
# s.sort_index().loc[8]  # 但不能是单值,必须是切片

Out[80]:

0    a
2    c
3    b
4    e
5    d
dtype: object

Out[80]:

0    a
3    b
2    c
5    d
4    e
dtype: object

Out[80]:

2    c
3    b
4    e
5    d
dtype: object

Out[80]:

Series([], dtype: object)

In [82]:

# Selection By Position
# 通过位置选择,仅通过基于索引的整数,与python和numpy类似,从0开始,且不包括最后一个
# iloc的输入:
# 1. 整数
# 2. 整数的list
# 3. 整数的切片
# 4. 布尔值数组
# 5. 调用函数

# Series
s1 = pd.Series(np.random.randn(5), index=list(range(0,10,2)))
s1
s1.iloc[:3]
s1.iloc[3]
s1.iloc[:3] = 0
s1

Out[82]:

0   -0.312716
2    1.425936
4    1.716575
6    2.099666
8    0.262365
dtype: float64

Out[82]:

0   -0.312716
2    1.425936
4    1.716575
dtype: float64

Out[82]:

2.099665679869975

Out[82]:

0    0.000000
2    0.000000
4    0.000000
6    2.099666
8    0.262365
dtype: float64

In [83]:

# DataFrame
df1 = pd.DataFrame(np.random.randn(6,4),
                  index=list(range(0,12,2)),
                  columns=list(range(0,8,2)))
df1

Out[83]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  0 2 4 6
0 1.635993 -0.512450 1.786760 -0.002533
2 0.173188 0.275977 -0.044987 -1.077772
4 1.985020 1.604020 0.127853 -1.003384
6 0.250428 -0.102090 1.566787 -1.708521
8 -2.111103 -1.232141 0.863753 -0.545229
10 -1.762999 1.009840 0.274013 0.786940

In [87]:

df1.iloc[:3]
df1.iloc[1:5, 2:4]
df1.iloc[[1, 3, 5], [1, 3]]
df1.iloc[1:3, :]
df1.iloc[:, 1:3]

Out[87]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  0 2 4 6
0 1.635993 -0.512450 1.786760 -0.002533
2 0.173188 0.275977 -0.044987 -1.077772
4 1.985020 1.604020 0.127853 -1.003384

Out[87]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  4 6
2 -0.044987 -1.077772
4 0.127853 -1.003384
6 1.566787 -1.708521
8 0.863753 -0.545229

Out[87]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  2 6
2 0.275977 -1.077772
6 -0.102090 -1.708521
10 1.009840 0.786940

Out[87]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  0 2 4 6
2 0.173188 0.275977 -0.044987 -1.077772
4 1.985020 1.604020 0.127853 -1.003384

Out[87]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  2 4
0 -0.512450 1.786760
2 0.275977 -0.044987
4 1.604020 0.127853
6 -0.102090 1.566787
8 -1.232141 0.863753
10 1.009840 0.274013

In [89]:

# this is also equivalent to ``df1.iat[1,1]``
# 取单个的值
df1.iloc[1, 1]
df1.iat[1, 1]

Out[89]:

0.2759774784621013

Out[89]:

0.2759774784621013

In [92]:

# For getting a cross section using an integer position (equiv to df.xs(1))
# 取截面,得到Series
df1.iloc[1]
df1.iloc[:,1]

Out[92]:

0    0.173188
2    0.275977
4   -0.044987
6   -1.077772
Name: 2, dtype: float64

Out[92]:

0    -0.512450
2     0.275977
4     1.604020
6    -0.102090
8    -1.232141
10    1.009840
Name: 2, dtype: float64

In [93]:

# Out of range slice indexes are handled gracefully just as in Python/Numpy.
# 超过索引的切片处理,与python和numpy一样
# 注意:不能是单独索引,或列表中,有超过界限的值,只可以是slice,即带冒号的切片才不会提示错误

x = list(‘abcdef‘)
x[4:10]
x[8:10]
s = pd.Series(x)
s.iloc[4:10]
s.iloc[8:10]  # 超过界限bound返回空

Out[93]:

[‘e‘, ‘f‘]

Out[93]:

[]

Out[93]:

4    e
5    f
dtype: object

Out[93]:

Series([], dtype: object)

In [94]:

dfl = pd.DataFrame(np.random.randn(5,2), columns=list(‘AB‘))
dfl
dfl.iloc[:, 2:3]
dfl.iloc[:, 1:3]
dfl.iloc[4:6]

Out[94]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B
0 -0.069941 1.124145
1 -0.025781 0.940736
2 -0.117417 0.503736
3 0.882286 0.302845
4 -0.136374 0.276822

Out[94]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

 
0
1
2
3
4

Out[94]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  B
0 1.124145
1 0.940736
2 0.503736
3 0.302845
4 0.276822

Out[94]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B
4 -0.136374 0.276822

In [99]:

# Selection By Callable
# 通过调用函数进行选择

df1 = pd.DataFrame(np.random.randn(6,4),
                  index=list("abcdef"),
                  columns=list("ABCD"))
df1
df1.A

Out[99]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D
a -1.947578 0.874286 1.139484 -3.004564
b 0.565255 0.028440 0.685688 0.973264
c -1.275992 0.732339 -0.324490 1.116887
d 0.433325 0.002567 -1.310127 0.844756
e 0.341412 -0.606646 0.034623 0.772968
f 1.518936 -0.590351 0.604839 -1.461750

Out[99]:

a   -1.947578
b    0.565255
c   -1.275992
d    0.433325
e    0.341412
f    1.518936
Name: A, dtype: float64

In [100]:

df1.loc[lambda df: df.A > 0, :]
df1.loc[:, lambda df: [‘A‘, ‘B‘]]
df1.iloc[:, lambda df: [0, 1]]
df1[lambda df: df.columns[0]]

Out[100]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D
b 0.565255 0.028440 0.685688 0.973264
d 0.433325 0.002567 -1.310127 0.844756
e 0.341412 -0.606646 0.034623 0.772968
f 1.518936 -0.590351 0.604839 -1.461750

Out[100]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B
a -1.947578 0.874286
b 0.565255 0.028440
c -1.275992 0.732339
d 0.433325 0.002567
e 0.341412 -0.606646
f 1.518936 -0.590351

Out[100]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B
a -1.947578 0.874286
b 0.565255 0.028440
c -1.275992 0.732339
d 0.433325 0.002567
e 0.341412 -0.606646
f 1.518936 -0.590351

Out[100]:

a   -1.947578
b    0.565255
c   -1.275992
d    0.433325
e    0.341412
f    1.518936
Name: A, dtype: float64

In [101]:

df1.A
df1.A.loc[lambda s: s > 0]
df1.A.loc[df1.A > 0]

Out[101]:

a   -1.947578
b    0.565255
c   -1.275992
d    0.433325
e    0.341412
f    1.518936
Name: A, dtype: float64

Out[101]:

b    0.565255
d    0.433325
e    0.341412
f    1.518936
Name: A, dtype: float64

Out[101]:

b    0.565255
d    0.433325
e    0.341412
f    1.518936
Name: A, dtype: float64

In [ ]:

# 使用这些方法或索引,可以使用链式的选择方法,而不用中间的临时变量。链式方法,不是链式[]
bb = pd.read_csv(‘data/baseball.csv‘, index_col=‘id‘)
bb.groupby([‘year‘, ‘team‘]).sum().loc[lambda df: df.r > 100]

In [102]:

# IX Indexer is Deprecated
# 不推荐使用ix
# in favor of the more strict .iloc and .loc indexers.
# 使用.iloc和.loc代替.ix

dfd = pd.DataFrame({‘A‘: [1, 2, 3],‘B‘: [4, 5, 6]},index=list(‘abc‘))
dfd

Out[102]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B
a 1 4
b 2 5
c 3 6

In [103]:

dfd.ix[[0, 2], ‘A‘]
d:\python\36-64\lib\site-packages\ipykernel_launcher.py:1: DeprecationWarning:
.ix is deprecated. Please use
.loc for label based indexing or
.iloc for positional indexing

See the documentation here:
http://pandas.pydata.org/pandas-docs/stable/indexing.html#ix-indexer-is-deprecated
  """Entry point for launching an IPython kernel.

Out[103]:

a    1
c    3
Name: A, dtype: int64

In [105]:

dfd.index[[0, 2]]  # 取得索引的名称
dfd.loc[dfd.index[[0, 2]], ‘A‘]
dfd.columns.get_loc(‘A‘)  # 取得列的索引值
dfd.iloc[[0, 2], dfd.columns.get_loc(‘A‘)]

Out[105]:

Index([‘a‘, ‘c‘], dtype=‘object‘)

Out[105]:

a    1
c    3
Name: A, dtype: int64

Out[105]:

0

Out[105]:

a    1
c    3
Name: A, dtype: int64

In [106]:

# Indexing with list with missing labels is Deprecated
# 不推荐用有缺失标签的list进行索引
# using .loc or [] with a list with one or more missing labels, is deprecated, in favor of .reindex.
# 推荐使用.reindex

s = pd.Series([1, 2, 3])
s

Out[106]:

0    1
1    2
2    3
dtype: int64

In [107]:

s.loc[[1, 2]]  # list中的keys都存在,则没有变化

Out[107]:

1    2
2    3
dtype: int64

In [108]:

s.loc[[1, 2, 3]]  # 当有缺失时,赋值为NaN
d:\python\36-64\lib\site-packages\ipykernel_launcher.py:1: FutureWarning:
Passing list-likes to .loc or [] with any missing label will raise
KeyError in the future, you can use .reindex() as an alternative.

See the documentation here:
http://pandas.pydata.org/pandas-docs/stable/indexing.html#deprecate-loc-reindex-listlike
  """Entry point for launching an IPython kernel.

Out[108]:

1    2.0
2    3.0
3    NaN
dtype: float64

In [109]:

# Reindexing

s.reindex([1, 2, 3])

Out[109]:

1    2.0
2    3.0
3    NaN
dtype: float64

In [110]:

# 如果仅选择有效的keys
labels = [1, 2, 3]
s.index.intersection(labels)  # index和labes的交集
s.loc[s.index.intersection(labels)]

Out[110]:

Int64Index([1, 2], dtype=‘int64‘)

Out[110]:

1    2
2    3
dtype: int64

In [112]:

# reindex 索引中不能有重复的项
s = pd.Series(np.arange(4), index=[‘a‘, ‘a‘, ‘b‘, ‘c‘])
s
labels = [‘c‘, ‘d‘]
# s.reindex(labels)  # 不能reindex

Out[112]:

a    0
a    1
b    2
c    3
dtype: int32

In [113]:

# 可以先把交集切出来,再进行reindex
# 但是交集不能有重复的index
s.index.intersection(labels)
s.loc[s.index.intersection(labels)]
s.loc[s.index.intersection(labels)].reindex(labels)

Out[113]:

Index([‘c‘], dtype=‘object‘)

Out[113]:

c    3
dtype: int32

Out[113]:

c    3.0
d    NaN
dtype: float64

In [114]:

# Selecting Random Samples
# 随机取样选择
# 默认行取样

s = pd.Series([0,1,2,3,4,5])
s

Out[114]:

0    0
1    1
2    2
3    3
4    4
5    5
dtype: int64

In [129]:

s.sample()  # 默认取1行
s.sample(n=3)  # 取3行
s.sample(frac=0.5)  # 小数,行数百分数
s.sample(frac=0.8)  # 小数
s

Out[129]:

1    1
dtype: int64

Out[129]:

3    3
4    4
5    5
dtype: int64

Out[129]:

2    2
3    3
4    4
dtype: int64

Out[129]:

2    2
1    1
3    3
0    0
5    5
dtype: int64

Out[129]:

0    0
1    1
2    2
3    3
4    4
5    5
dtype: int64

In [132]:

s.sample(n=6, replace=False)  # 默认
s.sample(n=6, replace=True)  # replace,不改变本身
s

Out[132]:

5    5
4    4
1    1
0    0
2    2
3    3
dtype: int64

Out[132]:

0    0
4    4
0    0
2    2
0    0
0    0
dtype: int64

Out[132]:

0    0
1    1
2    2
3    3
4    4
5    5
dtype: int64

In [166]:

# 默认每行都有同样的概率被抽样到,也可以指定每行的概率比重
example_weights = [0, 0, 0.2, 0.2, 0.2, 0.4]
s.sample(n=3, weights=example_weights)

example_weights2 = [0.5, 0, 0, 0, 0, 0]  # 权重将会自动的归一化
s.sample(n=1, weights=example_weights2)

Out[166]:

2    2
3    3
5    5
dtype: int64

Out[166]:

0    0
dtype: int64

In [175]:

# 可以指定DataFrame的某列作为权重
df2 = pd.DataFrame({‘col1‘:[9,8,7,6], ‘weight_column‘:[0.5, 0.4, 0.1, 0]})
df2.sample(n = 3, weights = ‘weight_column‘)

Out[175]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  col1 weight_column
1 8 0.4
2 7 0.1
0 9 0.5

In [196]:

# 对列进行抽样
df3 = pd.DataFrame({‘col1‘:[1,2,3], ‘col2‘:[2,3,4], ‘col3‘:[3,4,5]})
df3
df3.sample(n=2, axis=1)  # 指定axis=1,对列抽样,抽取的是列的组合
df3.sample(n=2, axis=0)

Out[196]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  col1 col2 col3
0 1 2 3
1 2 3 4
2 3 4 5

Out[196]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  col3 col2
0 3 2
1 4 3
2 5 4

Out[196]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  col1 col2 col3
2 3 4 5
0 1 2 3

In [220]:

# 可以指定random seed 或者 numpy 的 randomState 对象,作为sample 随机数生成器的种子
# 一旦seed确定,随机数不变
df3.sample(n=2, random_state=2)
df3.sample(n=2, random_state=2)
df3.sample(n=2, random_state=200)
df3.sample(n=2, random_state=200)

Out[220]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  col1 col2 col3
2 3 4 5
1 2 3 4

Out[220]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  col1 col2 col3
2 3 4 5
1 2 3 4

Out[220]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  col1 col2 col3
0 1 2 3
1 2 3 4

Out[220]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  col1 col2 col3
0 1 2 3
1 2 3 4

In [222]:

# Setting With Enlargement
# loc或[] 操作 可以通过赋值不存在的键扩大Series或Dataframe

# Series
se = pd.Series([1,2,3])
se
se[5] = 5  # append
se

Out[222]:

0    1
1    2
2    3
dtype: int64

Out[222]:

0    1
1    2
2    3
5    5
dtype: int64

In [223]:

# DataFrame

dfi = pd.DataFrame(np.arange(6).reshape(3,2),columns=[‘A‘,‘B‘])
dfi

Out[223]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B
0 0 1
1 2 3
2 4 5

In [224]:

dfi.loc[:,‘C‘] = dfi.loc[:,‘A‘]  # enlarge 增加列
dfi

Out[224]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C
0 0 1 0
1 2 3 2
2 4 5 4

In [225]:

dfi.loc[3] = 5  # append 增加行
dfi

Out[225]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C
0 0 1 0
1 2 3 2
2 4 5 4
3 5 5 5

In [231]:

# Fast scalar value getting and setting
# 快速取得或设置标量的值
# [] 可以进行很多操作,所以它为了知道你要进行那种操作,会有一点计算开销
# 最快的标量访问方式是使用 at 和 iat 方法,他们可以在所有的数据结构上使用
# at 类似于 loc 基于 label
# iat 类似于 iloc 基于 整数index
s = pd.Series([0,1,2,3,4,5])
s
df = pd.DataFrame(np.random.randn(8, 4), index=dates, columns=[‘A‘, ‘B‘, ‘C‘, ‘D‘])
df

Out[231]:

0    0
1    1
2    2
3    3
4    4
5    5
dtype: int64

Out[231]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D
2000-01-01 0.845046 -0.119758 1.354224 -0.134199
2000-01-02 -1.935579 -1.469185 -2.581439 0.355347
2000-01-03 -0.038740 -1.524056 1.376257 1.572331
2000-01-04 -0.846971 0.189231 -0.287885 -0.561706
2000-01-05 -0.127290 -0.043918 0.103347 -1.055387
2000-01-06 0.406437 1.917624 0.810463 0.367583
2000-01-07 0.438904 -0.230190 0.593607 -0.438856
2000-01-08 -1.955122 1.531260 0.889124 -0.014259

In [233]:

# get value
s.iat[5]
df.at[dates[5], ‘A‘]
df.iat[3, 0]

Out[233]:

5

Out[233]:

0.40643702489386246

Out[233]:

-0.8469710793801154

In [234]:

# set value
df.at[dates[5], ‘E‘] = 7  # 没有列就增加一列,没有值的默认赋值为nan
df

Out[234]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D E
2000-01-01 0.845046 -0.119758 1.354224 -0.134199 NaN
2000-01-02 -1.935579 -1.469185 -2.581439 0.355347 NaN
2000-01-03 -0.038740 -1.524056 1.376257 1.572331 NaN
2000-01-04 -0.846971 0.189231 -0.287885 -0.561706 NaN
2000-01-05 -0.127290 -0.043918 0.103347 -1.055387 NaN
2000-01-06 0.406437 1.917624 0.810463 0.367583 7.0
2000-01-07 0.438904 -0.230190 0.593607 -0.438856 NaN
2000-01-08 -1.955122 1.531260 0.889124 -0.014259 NaN

In [235]:

df.iat[3, 0] = 7
df

Out[235]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D E
2000-01-01 0.845046 -0.119758 1.354224 -0.134199 NaN
2000-01-02 -1.935579 -1.469185 -2.581439 0.355347 NaN
2000-01-03 -0.038740 -1.524056 1.376257 1.572331 NaN
2000-01-04 7.000000 0.189231 -0.287885 -0.561706 NaN
2000-01-05 -0.127290 -0.043918 0.103347 -1.055387 NaN
2000-01-06 0.406437 1.917624 0.810463 0.367583 7.0
2000-01-07 0.438904 -0.230190 0.593607 -0.438856 NaN
2000-01-08 -1.955122 1.531260 0.889124 -0.014259 NaN

In [236]:

df.at[dates[-1]+1, 0] = 7  # 行和列都扩展了
df

Out[236]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D E 0
2000-01-01 0.845046 -0.119758 1.354224 -0.134199 NaN NaN
2000-01-02 -1.935579 -1.469185 -2.581439 0.355347 NaN NaN
2000-01-03 -0.038740 -1.524056 1.376257 1.572331 NaN NaN
2000-01-04 7.000000 0.189231 -0.287885 -0.561706 NaN NaN
2000-01-05 -0.127290 -0.043918 0.103347 -1.055387 NaN NaN
2000-01-06 0.406437 1.917624 0.810463 0.367583 7.0 NaN
2000-01-07 0.438904 -0.230190 0.593607 -0.438856 NaN NaN
2000-01-08 -1.955122 1.531260 0.889124 -0.014259 NaN NaN
2000-01-09 NaN NaN NaN NaN NaN 7.0

In [ ]:

# Boolean indexing
# 使用布尔向量过滤数据
# 操作符包括:| for or, & for and, and ~ for not ,必须用括号进行分组

In [237]:

s = pd.Series(range(-3, 4))  # 不用把range先list,直接可以series
s

Out[237]:

0   -3
1   -2
2   -1
3    0
4    1
5    2
6    3
dtype: int64

In [238]:

s[s >= 0]  # 直接用series,不用取其值
s[~(s < 0)]
s[(s < -1) | (s > 0.5)]

Out[238]:

3    0
4    1
5    2
6    3
dtype: int64

Out[238]:

3    0
4    1
5    2
6    3
dtype: int64

Out[238]:

0   -3
1   -2
4    1
5    2
6    3
dtype: int64

In [239]:

df[df[‘A‘] > 0]

Out[239]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D E 0
2000-01-01 0.845046 -0.119758 1.354224 -0.134199 NaN NaN
2000-01-04 7.000000 0.189231 -0.287885 -0.561706 NaN NaN
2000-01-06 0.406437 1.917624 0.810463 0.367583 7.0 NaN
2000-01-07 0.438904 -0.230190 0.593607 -0.438856 NaN NaN

In [240]:

# List comprehensions and map method of Series can also be used to produce more complex criteria:
# 列表生成式和map方法 也可以用来生成 更复杂的条件判断

df2 = pd.DataFrame({‘a‘ : [‘one‘, ‘one‘, ‘two‘, ‘three‘, ‘two‘, ‘one‘, ‘six‘],
                     ‘b‘ : [‘x‘, ‘y‘, ‘y‘, ‘x‘, ‘y‘, ‘x‘, ‘x‘],
                     ‘c‘ : np.random.randn(7)})
df2

Out[240]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c
0 one x 1.706402
1 one y 0.491977
2 two y 1.357986
3 three x -1.023513
4 two y -0.653028
5 one x 0.041052
6 six x 1.021882

In [241]:

# 判别式
criterion = df2[‘a‘].map(lambda x: x.startswith(‘t‘))  # 选择 two 和 three
criterion

Out[241]:

0    False
1    False
2     True
3     True
4     True
5    False
6    False
Name: a, dtype: bool

In [242]:

df2[criterion]  # 根据 a 列的判别式 选择数据表的一部分,包含其他列

Out[242]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c
2 two y 1.357986
3 three x -1.023513
4 two y -0.653028

In [243]:

# 等价的方式,但是速度慢一些
df2[[x.startswith(‘t‘) for x in df2[‘a‘]]]  # 不适用map,而是用列表生成式

Out[243]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c
2 two y 1.357986
3 three x -1.023513
4 two y -0.653028

In [244]:

# 复合判断
df2[criterion & (df2[‘b‘] == ‘x‘)]  # a 列 和 b 列 均符合某类要求

Out[244]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c
3 three x -1.023513

In [245]:

# 布尔向量选择 可以与索引选择一并使用
df2.loc[criterion & (df2[‘b‘] == ‘x‘),‘b‘:‘c‘]  # 只选择 b 和 c 两列,不选择c列

Out[245]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  b c
3 x -1.023513

In [ ]:

# Indexing with isin
# 用isin索引

In [246]:

# series
# 对列数据进行判断
s = pd.Series(np.arange(5), index=np.arange(5)[::-1], dtype=‘int64‘)
s

Out[246]:

4    0
3    1
2    2
1    3
0    4
dtype: int64

In [248]:

s.isin([2, 4, 6])  # 列数据中是否存在列表中的值,返回布尔值
s[s.isin([2, 4, 6])]  # 可以利用返回的布尔值进行选择

Out[248]:

4    False
3    False
2     True
1    False
0     True
dtype: bool

Out[248]:

2    2
0    4
dtype: int64

In [249]:

# 也可以对index obj 进行筛选
s[s.index.isin([2, 4, 6])]
s.reindex([2, 4, 6])  # reindex不同,列表中没有的值返回了nan,且原来的int64返回了float64数据类型

Out[249]:

4    0
2    2
dtype: int64

Out[249]:

2    2.0
4    0.0
6    NaN
dtype: float64

In [250]:

# 对应多重索引,可以单独选择索引级别
s_mi = pd.Series(np.arange(6),index=pd.MultiIndex.from_product([[0, 1], [‘a‘, ‘b‘, ‘c‘]]))
s_mi

Out[250]:

0  a    0
   b    1
   c    2
1  a    3
   b    4
   c    5
dtype: int32

In [252]:

s_mi.iloc[s_mi.index.isin([(1, ‘a‘), (2, ‘b‘), (0, ‘c‘)])]
s_mi.iloc[s_mi.index.isin([‘a‘, ‘c‘, ‘e‘], level=1)]  # 指定索引级别,在第二级索引中选择

Out[252]:

0  c    2
1  a    3
dtype: int32

Out[252]:

0  a    0
   c    2
1  a    3
   c    5
dtype: int32

In [253]:

# DataFrame
df = pd.DataFrame({‘vals‘: [1, 2, 3, 4], ‘ids‘: [‘a‘, ‘b‘, ‘f‘, ‘n‘],‘ids2‘: [‘a‘, ‘n‘, ‘c‘, ‘n‘]})
df

Out[253]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  ids ids2 vals
0 a a 1
1 b n 2
2 f c 3
3 n n 4

In [254]:

values = [‘a‘, ‘b‘, 1, 3]
df.isin(values)  # 匹配所有的值

Out[254]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  ids ids2 vals
0 True True True
1 True False False
2 False False True
3 False False False

In [262]:

values = {‘ids‘: [‘a‘, ‘b‘], ‘ids2‘: [‘a‘, ‘c‘], ‘vals‘: [1, 3]}
row_mask = df.isin(values)  # 对不用的列,分别匹配某些值
row_mask
# ?row_mask.all  # Return whether all elements are True over requested axis
row_mask = row_mask.all(1)
row_mask
df[row_mask]  # 选择全是True的行

Out[262]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  ids ids2 vals
0 True True True
1 True False False
2 False True True
3 False False False

Out[262]:

0     True
1    False
2    False
3    False
dtype: bool

Out[262]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  ids ids2 vals
0 a a 1

In [264]:

# The where() Method and Masking
# To guarantee that selection output has the same shape as the original data
# 保证选集输出与原数据有同样的shape形态

# series
s
s[s > 0]  # 只返回满足的项
s.where(s > 0)  # 全部返回,不满足的项,赋值nan

Out[264]:

4    0
3    1
2    2
1    3
0    4
dtype: int64

Out[264]:

3    1
2    2
1    3
0    4
dtype: int64

Out[264]:

4    NaN
3    1.0
2    2.0
1    3.0
0    4.0
dtype: float64

In [267]:

# DataFrame 使用布尔值选择时,返回值保留原数据结构
df = pd.DataFrame(np.random.randn(8, 4), index=dates, columns=[‘A‘, ‘B‘, ‘C‘, ‘D‘])
df

Out[267]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D
2000-01-01 0.383691 -0.500453 0.101632 0.848213
2000-01-02 -1.048619 0.856605 -0.295425 1.060710
2000-01-03 -0.214918 -1.989228 0.278514 1.088771
2000-01-04 -2.326385 -0.225754 -1.331598 1.457230
2000-01-05 0.656919 1.081810 1.148303 -0.089382
2000-01-06 -1.041194 0.533706 -1.084442 1.824709
2000-01-07 -1.040706 -2.336161 0.565496 0.269414
2000-01-08 0.166739 -0.075381 -0.951126 -0.347865

In [268]:

df[df < 0]
df.where(df < 0)  # 等价于上式
df.where(df < 0, -df)  # where 可以传入另一个参数,用于替换条件为 False 的项,返回copy数据拷贝,不修改原值
df

Out[268]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D
2000-01-01 NaN -0.500453 NaN NaN
2000-01-02 -1.048619 NaN -0.295425 NaN
2000-01-03 -0.214918 -1.989228 NaN NaN
2000-01-04 -2.326385 -0.225754 -1.331598 NaN
2000-01-05 NaN NaN NaN -0.089382
2000-01-06 -1.041194 NaN -1.084442 NaN
2000-01-07 -1.040706 -2.336161 NaN NaN
2000-01-08 NaN -0.075381 -0.951126 -0.347865

Out[268]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D
2000-01-01 NaN -0.500453 NaN NaN
2000-01-02 -1.048619 NaN -0.295425 NaN
2000-01-03 -0.214918 -1.989228 NaN NaN
2000-01-04 -2.326385 -0.225754 -1.331598 NaN
2000-01-05 NaN NaN NaN -0.089382
2000-01-06 -1.041194 NaN -1.084442 NaN
2000-01-07 -1.040706 -2.336161 NaN NaN
2000-01-08 NaN -0.075381 -0.951126 -0.347865

Out[268]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D
2000-01-01 -0.383691 -0.500453 -0.101632 -0.848213
2000-01-02 -1.048619 -0.856605 -0.295425 -1.060710
2000-01-03 -0.214918 -1.989228 -0.278514 -1.088771
2000-01-04 -2.326385 -0.225754 -1.331598 -1.457230
2000-01-05 -0.656919 -1.081810 -1.148303 -0.089382
2000-01-06 -1.041194 -0.533706 -1.084442 -1.824709
2000-01-07 -1.040706 -2.336161 -0.565496 -0.269414
2000-01-08 -0.166739 -0.075381 -0.951126 -0.347865

Out[268]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D
2000-01-01 0.383691 -0.500453 0.101632 0.848213
2000-01-02 -1.048619 0.856605 -0.295425 1.060710
2000-01-03 -0.214918 -1.989228 0.278514 1.088771
2000-01-04 -2.326385 -0.225754 -1.331598 1.457230
2000-01-05 0.656919 1.081810 1.148303 -0.089382
2000-01-06 -1.041194 0.533706 -1.084442 1.824709
2000-01-07 -1.040706 -2.336161 0.565496 0.269414
2000-01-08 0.166739 -0.075381 -0.951126 -0.347865

In [270]:

# You may wish to set values based on some boolean criteria. This can be done intuitively like so:
# 设置基于布尔值的项值

s2 = s.copy()
s2
s2[s2 < 3] = 0
s2
df2 = df.copy()
df2
df2[df2 < 0] = 0
df2

Out[270]:

4    0
3    1
2    2
1    3
0    4
dtype: int64

Out[270]:

4    0
3    0
2    0
1    3
0    4
dtype: int64

Out[270]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D
2000-01-01 0.383691 -0.500453 0.101632 0.848213
2000-01-02 -1.048619 0.856605 -0.295425 1.060710
2000-01-03 -0.214918 -1.989228 0.278514 1.088771
2000-01-04 -2.326385 -0.225754 -1.331598 1.457230
2000-01-05 0.656919 1.081810 1.148303 -0.089382
2000-01-06 -1.041194 0.533706 -1.084442 1.824709
2000-01-07 -1.040706 -2.336161 0.565496 0.269414
2000-01-08 0.166739 -0.075381 -0.951126 -0.347865

Out[270]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D
2000-01-01 0.383691 0.000000 0.101632 0.848213
2000-01-02 0.000000 0.856605 0.000000 1.060710
2000-01-03 0.000000 0.000000 0.278514 1.088771
2000-01-04 0.000000 0.000000 0.000000 1.457230
2000-01-05 0.656919 1.081810 1.148303 0.000000
2000-01-06 0.000000 0.533706 0.000000 1.824709
2000-01-07 0.000000 0.000000 0.565496 0.269414
2000-01-08 0.166739 0.000000 0.000000 0.000000

In [271]:

# where 默认返回修改后的数据拷贝,原值不变;可以设置inplace参数,直接修改原值,而不是创建拷贝

df_orig = df.copy()
df_orig.where(df > 0, -df, inplace=True)
df_orig

Out[271]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D
2000-01-01 0.383691 0.500453 0.101632 0.848213
2000-01-02 1.048619 0.856605 0.295425 1.060710
2000-01-03 0.214918 1.989228 0.278514 1.088771
2000-01-04 2.326385 0.225754 1.331598 1.457230
2000-01-05 0.656919 1.081810 1.148303 0.089382
2000-01-06 1.041194 0.533706 1.084442 1.824709
2000-01-07 1.040706 2.336161 0.565496 0.269414
2000-01-08 0.166739 0.075381 0.951126 0.347865

In [272]:

# 注意 :pandas 和 numpy 的where方法不一样
# 一般的,df1.where(m, df2)  相当于 np.where(m, df1, df2)

df.where(df < 0, -df) == np.where(df < 0, df, -df)

Out[272]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D
2000-01-01 True True True True
2000-01-02 True True True True
2000-01-03 True True True True
2000-01-04 True True True True
2000-01-05 True True True True
2000-01-06 True True True True
2000-01-07 True True True True
2000-01-08 True True True True

In [276]:

# alignment 定位,对齐
# where 可以选择局部(部分区域)的布尔条件
# This is analogous to partial setting via .loc (but on the contents rather than the axis labels)

df2 = df.copy()
df2
df2[1:4]   # 行选择
df2.where(df2[1:4] > 0, 3)  # 对不符合项的值进行赋值!
df2[ df2[1:4] > 0 ] = 3  # 只定位部分区域,对符合项的值进行赋值
df2

Out[276]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D
2000-01-01 0.383691 -0.500453 0.101632 0.848213
2000-01-02 -1.048619 0.856605 -0.295425 1.060710
2000-01-03 -0.214918 -1.989228 0.278514 1.088771
2000-01-04 -2.326385 -0.225754 -1.331598 1.457230
2000-01-05 0.656919 1.081810 1.148303 -0.089382
2000-01-06 -1.041194 0.533706 -1.084442 1.824709
2000-01-07 -1.040706 -2.336161 0.565496 0.269414
2000-01-08 0.166739 -0.075381 -0.951126 -0.347865

Out[276]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D
2000-01-02 -1.048619 0.856605 -0.295425 1.060710
2000-01-03 -0.214918 -1.989228 0.278514 1.088771
2000-01-04 -2.326385 -0.225754 -1.331598 1.457230

Out[276]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D
2000-01-01 3.0 3.000000 3.000000 3.000000
2000-01-02 3.0 0.856605 3.000000 1.060710
2000-01-03 3.0 3.000000 0.278514 1.088771
2000-01-04 3.0 3.000000 3.000000 1.457230
2000-01-05 3.0 3.000000 3.000000 3.000000
2000-01-06 3.0 3.000000 3.000000 3.000000
2000-01-07 3.0 3.000000 3.000000 3.000000
2000-01-08 3.0 3.000000 3.000000 3.000000

Out[276]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D
2000-01-01 0.383691 -0.500453 0.101632 0.848213
2000-01-02 -1.048619 3.000000 -0.295425 3.000000
2000-01-03 -0.214918 -1.989228 3.000000 3.000000
2000-01-04 -2.326385 -0.225754 -1.331598 3.000000
2000-01-05 0.656919 1.081810 1.148303 -0.089382
2000-01-06 -1.041194 0.533706 -1.084442 1.824709
2000-01-07 -1.040706 -2.336161 0.565496 0.269414
2000-01-08 0.166739 -0.075381 -0.951126 -0.347865

In [279]:

# Where can also accept axis and level parameters to align the input when performing the where.
# where 可以接受 轴参数axis 和 级别参数level
df2 = df.copy()
df2
df2.where(df2>0,df2[‘A‘],axis=‘index‘)  # 小于等于0的值,赋值为A列的值
df2
df2.apply(lambda x, y: x.where(x>0,y), y=df[‘A‘])  # 相当于上式,但此式较慢,同样不改变原值,而是生成一个拷贝copy
df2

Out[279]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D
2000-01-01 0.383691 -0.500453 0.101632 0.848213
2000-01-02 -1.048619 0.856605 -0.295425 1.060710
2000-01-03 -0.214918 -1.989228 0.278514 1.088771
2000-01-04 -2.326385 -0.225754 -1.331598 1.457230
2000-01-05 0.656919 1.081810 1.148303 -0.089382
2000-01-06 -1.041194 0.533706 -1.084442 1.824709
2000-01-07 -1.040706 -2.336161 0.565496 0.269414
2000-01-08 0.166739 -0.075381 -0.951126 -0.347865

Out[279]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D
2000-01-01 0.383691 0.383691 0.101632 0.848213
2000-01-02 -1.048619 0.856605 -1.048619 1.060710
2000-01-03 -0.214918 -0.214918 0.278514 1.088771
2000-01-04 -2.326385 -2.326385 -2.326385 1.457230
2000-01-05 0.656919 1.081810 1.148303 0.656919
2000-01-06 -1.041194 0.533706 -1.041194 1.824709
2000-01-07 -1.040706 -1.040706 0.565496 0.269414
2000-01-08 0.166739 0.166739 0.166739 0.166739

Out[279]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D
2000-01-01 0.383691 -0.500453 0.101632 0.848213
2000-01-02 -1.048619 0.856605 -0.295425 1.060710
2000-01-03 -0.214918 -1.989228 0.278514 1.088771
2000-01-04 -2.326385 -0.225754 -1.331598 1.457230
2000-01-05 0.656919 1.081810 1.148303 -0.089382
2000-01-06 -1.041194 0.533706 -1.084442 1.824709
2000-01-07 -1.040706 -2.336161 0.565496 0.269414
2000-01-08 0.166739 -0.075381 -0.951126 -0.347865

Out[279]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D
2000-01-01 0.383691 0.383691 0.101632 0.848213
2000-01-02 -1.048619 0.856605 -1.048619 1.060710
2000-01-03 -0.214918 -0.214918 0.278514 1.088771
2000-01-04 -2.326385 -2.326385 -2.326385 1.457230
2000-01-05 0.656919 1.081810 1.148303 0.656919
2000-01-06 -1.041194 0.533706 -1.041194 1.824709
2000-01-07 -1.040706 -1.040706 0.565496 0.269414
2000-01-08 0.166739 0.166739 0.166739 0.166739

Out[279]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D
2000-01-01 0.383691 -0.500453 0.101632 0.848213
2000-01-02 -1.048619 0.856605 -0.295425 1.060710
2000-01-03 -0.214918 -1.989228 0.278514 1.088771
2000-01-04 -2.326385 -0.225754 -1.331598 1.457230
2000-01-05 0.656919 1.081810 1.148303 -0.089382
2000-01-06 -1.041194 0.533706 -1.084442 1.824709
2000-01-07 -1.040706 -2.336161 0.565496 0.269414
2000-01-08 0.166739 -0.075381 -0.951126 -0.347865

In [280]:

# where 可以接受一个函数调用,此函数只能有一个参数,且返回有效的布尔条件
df3 = pd.DataFrame({‘A‘: [1, 2, 3],‘B‘: [4, 5, 6],‘C‘: [7, 8, 9]})
df3
df3.where(lambda x: x > 4, lambda x: x + 10)  # x<=4 的值 赋值为  x+10

Out[280]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C
0 1 4 7
1 2 5 8
2 3 6 9

Out[280]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C
0 11 14 7
1 12 5 8
2 13 6 9

In [282]:

# mask 遮罩 mask is the inverse boolean operation of where. 反向的布尔值操作
s
s.mask(s >= 0)  # 选择<0 的值, 不符合项 置为nan
df
df.mask(df >= 0)

Out[282]:

4    0
3    1
2    2
1    3
0    4
dtype: int64

Out[282]:

4   NaN
3   NaN
2   NaN
1   NaN
0   NaN
dtype: float64

Out[282]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D
2000-01-01 0.383691 -0.500453 0.101632 0.848213
2000-01-02 -1.048619 0.856605 -0.295425 1.060710
2000-01-03 -0.214918 -1.989228 0.278514 1.088771
2000-01-04 -2.326385 -0.225754 -1.331598 1.457230
2000-01-05 0.656919 1.081810 1.148303 -0.089382
2000-01-06 -1.041194 0.533706 -1.084442 1.824709
2000-01-07 -1.040706 -2.336161 0.565496 0.269414
2000-01-08 0.166739 -0.075381 -0.951126 -0.347865

Out[282]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D
2000-01-01 NaN -0.500453 NaN NaN
2000-01-02 -1.048619 NaN -0.295425 NaN
2000-01-03 -0.214918 -1.989228 NaN NaN
2000-01-04 -2.326385 -0.225754 -1.331598 NaN
2000-01-05 NaN NaN NaN -0.089382
2000-01-06 -1.041194 NaN -1.084442 NaN
2000-01-07 -1.040706 -2.336161 NaN NaN
2000-01-08 NaN -0.075381 -0.951126 -0.347865

In [288]:

# The query() Method (Experimental) 对 DataFrame对象 使用表达式进行选择

# 例如 :选择b列中 在a列和c列两值中间的 行,a<b<c
n = 10
df = pd.DataFrame(np.random.rand(n, 3), columns=list(‘abc‘))
df

Out[288]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c
0 0.283094 0.051807 0.126487
1 0.020097 0.373023 0.147193
2 0.091921 0.830956 0.143214
3 0.340304 0.527246 0.709769
4 0.651722 0.344524 0.151233
5 0.396685 0.524376 0.540237
6 0.502751 0.627708 0.708038
7 0.472338 0.269770 0.586165
8 0.937522 0.239560 0.861873
9 0.661879 0.465536 0.271580

In [289]:

# pure python
df[(df.a < df.b) & (df.b < df.c)]

Out[289]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c
3 0.340304 0.527246 0.709769
5 0.396685 0.524376 0.540237
6 0.502751 0.627708 0.708038

In [290]:

# query,传入的是str表达式
df.query(‘(a < b) & (b < c)‘)  # 比纯py慢?!

Out[290]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c
3 0.340304 0.527246 0.709769
5 0.396685 0.524376 0.540237
6 0.502751 0.627708 0.708038

In [302]:

# 对于命名的index索引是低效的,比利用列名称
# 而且如果索引的名称和列名同名,列名优先
df = pd.DataFrame(np.random.randint(n / 2, size=(n, 2)), columns=list(‘bc‘))
# df
df.index.name = "a"
df

Out[302]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  b c
a    
0 0 4
1 1 2
2 3 0
3 0 3
4 4 3
5 0 0
6 0 4
7 1 4
8 3 0
9 1 4

In [303]:

df.query(‘a <= b and b <= c‘)

Out[303]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  b c
a    
0 0 4
1 1 2

In [305]:

# 可以不使用索引的名称,而是直接用index,这样同时可以避免与列名重名
df.query(‘index <= b <= c‘)

Out[305]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  b c
a    
0 0 4
1 1 2

In [307]:

# MultiIndex query() Syntax
# 对于多重索引

n = 10
colors = np.random.choice([‘red‘, ‘green‘], size=n)
colors
foods = np.random.choice([‘eggs‘, ‘ham‘], size=n)
foods

Out[307]:

array([‘green‘, ‘green‘, ‘green‘, ‘green‘, ‘green‘, ‘green‘, ‘green‘,
       ‘red‘, ‘green‘, ‘green‘], dtype=‘<U5‘)

Out[307]:

array([‘ham‘, ‘eggs‘, ‘eggs‘, ‘eggs‘, ‘eggs‘, ‘ham‘, ‘eggs‘, ‘eggs‘,
       ‘ham‘, ‘ham‘], dtype=‘<U4‘)

In [308]:

index = pd.MultiIndex.from_arrays([colors, foods], names=[‘color‘, ‘food‘])
index
df = pd.DataFrame(np.random.randn(n, 2), index=index)
df

Out[308]:

MultiIndex(levels=[[‘green‘, ‘red‘], [‘eggs‘, ‘ham‘]],
           labels=[[0, 0, 0, 0, 0, 0, 0, 1, 0, 0], [1, 0, 0, 0, 0, 1, 0, 0, 1, 1]],
           names=[‘color‘, ‘food‘])

Out[308]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

    0 1
color food    
green ham -0.295761 1.399719
eggs 1.807185 0.498136
eggs -0.119640 2.279162
eggs -0.238709 -0.650418
eggs 2.235827 1.066954
ham 1.156794 1.694717
eggs -0.037158 -0.529213
red eggs 0.046799 0.763592
green ham 0.488240 -0.455112
ham -0.169486 -0.646891

In [309]:

df.query(‘color == "red"‘)

Out[309]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

    0 1
color food    
red eggs 0.046799 0.763592

In [310]:

# 如果多重索引没有命名 可以使用特殊的名字
df.index.names = [None, None]
df
df.query(‘ilevel_0 == "red"‘) # The convention is ilevel_0, which means “index level 0” for the 0th level of the index.

Out[310]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

    0 1
green ham -0.295761 1.399719
eggs 1.807185 0.498136
eggs -0.119640 2.279162
eggs -0.238709 -0.650418
eggs 2.235827 1.066954
ham 1.156794 1.694717
eggs -0.037158 -0.529213
red eggs 0.046799 0.763592
green ham 0.488240 -0.455112
ham -0.169486 -0.646891

Out[310]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

    0 1
red eggs 0.046799 0.763592

In [ ]:

# query() Use Cases 使用示例
# A use case for query() is when you have a collection of DataFrame objects
# that have a subset of column names (or index levels/names) in common.   ## 有公共列名称子集的df
# You can pass the same query to both frames
# without having to specify which frame you’re interested in querying.  ## 传入同样的query

In [311]:

df = pd.DataFrame(np.random.rand(n, 3), columns=list(‘abc‘))
df2 = pd.DataFrame(np.random.rand(n + 2, 3), columns=df.columns)
df
df2

Out[311]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c
0 0.096087 0.799309 0.112070
1 0.083101 0.505151 0.830588
2 0.501472 0.692792 0.663570
3 0.872821 0.442541 0.904903
4 0.513651 0.375617 0.786898
5 0.184368 0.285290 0.055147
6 0.284951 0.243556 0.732871
7 0.431525 0.676385 0.458296
8 0.743057 0.326079 0.434655
9 0.610921 0.717639 0.580765

Out[311]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c
0 0.804932 0.533058 0.713190
1 0.305893 0.460048 0.879321
2 0.344438 0.970870 0.685098
3 0.348010 0.839449 0.799309
4 0.844713 0.267562 0.771202
5 0.403534 0.088786 0.950782
6 0.181616 0.567118 0.989711
7 0.363736 0.852080 0.140771
8 0.866127 0.285365 0.025491
9 0.329751 0.121716 0.782729
10 0.029253 0.419409 0.051255
11 0.057406 0.106595 0.559687

In [315]:

expr = ‘0.0 <= a <= c <= 0.5‘
mp = map(lambda frame: frame.query(expr), [df, df2])  # 同一个表达式,作用在有同样列名的多个df上

In [316]:

for i in mp:
    print(i)
          a         b         c
0  0.096087  0.799309  0.112070
7  0.431525  0.676385  0.458296
           a         b         c
10  0.029253  0.419409  0.051255

In [317]:

# query() Python versus pandas Syntax Comparison

# Full numpy-like syntax
df = pd.DataFrame(np.random.randint(n, size=(n, 3)), columns=list(‘abc‘))
df

Out[317]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c
0 8 4 5
1 7 4 7
2 9 3 2
3 4 8 7
4 4 5 8
5 7 8 8
6 1 7 6
7 5 9 1
8 3 3 8
9 7 1 5

In [318]:

 df.query(‘(a < b) & (b < c)‘)
 df[(df.a < df.b) & (df.b < df.c)]

Out[318]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c
4 4 5 8

Out[318]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c
4 4 5 8

In [319]:

# 几种其他的不同的写法
df.query(‘a < b & b < c‘)  # 去掉括号
df.query(‘a < b and b < c‘)  # 使用英文and
df.query(‘a < b < c‘)  # 连写,优雅的表达

Out[319]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c
4 4 5 8

Out[319]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c
4 4 5 8

Out[319]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c
4 4 5 8

In [320]:

# The in and not in operators

# get all rows where columns "a" and "b" have overlapping values
# 得到a列和b列有重叠值的行,a列中的值在 in b列的值中
df = pd.DataFrame({‘a‘: list(‘aabbccddeeff‘), ‘b‘: list(‘aaaabbbbcccc‘),
                       ‘c‘: np.random.randint(5, size=12),
                       ‘d‘: np.random.randint(9, size=12)})
df

Out[320]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c d
0 a a 0 2
1 a a 0 6
2 b a 3 3
3 b a 1 2
4 c b 1 2
5 c b 1 2
6 d b 3 8
7 d b 1 0
8 e c 2 7
9 e c 0 1
10 f c 0 1
11 f c 3 1

In [323]:

df.query(‘a in b‘)  # 第一次运行113ms 第二次明显加快 25ms

Out[323]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c d
0 a a 0 2
1 a a 0 6
2 b a 3 3
3 b a 1 2
4 c b 1 2
5 c b 1 2

In [324]:

df[df.a.isin(df.b)]   # How you‘d do it in pure Python  仍然比query快 35ms

Out[324]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c d
0 a a 0 2
1 a a 0 6
2 b a 3 3
3 b a 1 2
4 c b 1 2
5 c b 1 2

In [325]:

df[~df.a.isin(df.b)]

Out[325]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c d
6 d b 3 8
7 d b 1 0
8 e c 2 7
9 e c 0 1
10 f c 0 1
11 f c 3 1

In [326]:

df.query(‘a not in b‘)

Out[326]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c d
6 d b 3 8
7 d b 1 0
8 e c 2 7
9 e c 0 1
10 f c 0 1
11 f c 3 1

In [328]:

# rows where cols a and b have overlapping values and col c‘s values are less than col d‘s
df.query(‘a in b and c < d‘)
df[df.a.isin(df.b) & (df.c < df.d)]

Out[328]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c d
0 a a 0 2
1 a a 0 6
3 b a 1 2
4 c b 1 2
5 c b 1 2

Out[328]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c d
0 a a 0 2
1 a a 0 6
3 b a 1 2
4 c b 1 2
5 c b 1 2

In [ ]:

# 注意:?????
# Note that in and not in are evaluated in Python, since numexpr has no equivalent of this operation.
# However, only the in/not in expression itself is evaluated in vanilla Python.
# For example, in the expression
df.query(‘a in b + c + d‘)
# (b + c + d) is evaluated by numexpr and then the in operation is evaluated in plain Python. In general, any operations that can be evaluated using numexpr will be.

In [329]:

# Special use of the == operator with list objects
# 特别的用法,== 用于list
# Comparing a list of values to a column using ==/!= works similarly to in/not in
# 用==/!=比较列表的值与列的值,类似于in/not in
df

Out[329]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c d
0 a a 0 2
1 a a 0 6
2 b a 3 3
3 b a 1 2
4 c b 1 2
5 c b 1 2
6 d b 3 8
7 d b 1 0
8 e c 2 7
9 e c 0 1
10 f c 0 1
11 f c 3 1

In [330]:

df.query(‘b == ["a", "b", "c"]‘)  # b列中有列表中值的

Out[330]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c d
0 a a 0 2
1 a a 0 6
2 b a 3 3
3 b a 1 2
4 c b 1 2
5 c b 1 2
6 d b 3 8
7 d b 1 0
8 e c 2 7
9 e c 0 1
10 f c 0 1
11 f c 3 1

In [332]:

df.query(‘c == [1, 2]‘)
df.query(‘[1, 2] in c‘)
df[df.c.isin([1, 2])]

Out[332]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c d
3 b a 1 2
4 c b 1 2
5 c b 1 2
7 d b 1 0
8 e c 2 7

Out[332]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c d
3 b a 1 2
4 c b 1 2
5 c b 1 2
7 d b 1 0
8 e c 2 7

Out[332]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c d
3 b a 1 2
4 c b 1 2
5 c b 1 2
7 d b 1 0
8 e c 2 7

In [333]:

# Boolean Operators 布尔操作符
# ~ 或 not
df = pd.DataFrame(np.random.rand(n, 3), columns=list(‘abc‘))
df
df[‘bools‘] = np.random.rand(len(df)) > 0.5
df

Out[333]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c
0 0.528671 0.265870 0.932892
1 0.520069 0.047895 0.478818
2 0.648595 0.180744 0.838445
3 0.145614 0.906190 0.762163
4 0.612637 0.027232 0.778020
5 0.640565 0.535538 0.018280
6 0.633664 0.124654 0.185709
7 0.635088 0.377300 0.914968
8 0.702684 0.504459 0.107014
9 0.635757 0.261144 0.665611

Out[333]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c bools
0 0.528671 0.265870 0.932892 False
1 0.520069 0.047895 0.478818 True
2 0.648595 0.180744 0.838445 True
3 0.145614 0.906190 0.762163 False
4 0.612637 0.027232 0.778020 True
5 0.640565 0.535538 0.018280 True
6 0.633664 0.124654 0.185709 True
7 0.635088 0.377300 0.914968 True
8 0.702684 0.504459 0.107014 False
9 0.635757 0.261144 0.665611 False

In [334]:

df.query(‘~bools‘)
df.query(‘not bools‘)

Out[334]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c bools
0 0.528671 0.265870 0.932892 False
3 0.145614 0.906190 0.762163 False
8 0.702684 0.504459 0.107014 False
9 0.635757 0.261144 0.665611 False

Out[334]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c bools
0 0.528671 0.265870 0.932892 False
3 0.145614 0.906190 0.762163 False
8 0.702684 0.504459 0.107014 False
9 0.635757 0.261144 0.665611 False

In [335]:

# 任意组合布尔表达式
shorter = df.query(‘a < b < c and (not bools) or bools > 2‘)  # short query syntax
longer = df[(df.a < df.b) & (df.b < df.c) & (~df.bools) | (df.bools > 2)]  # equivalent in pure Python
shorter
longer

Out[335]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c bools

Out[335]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c bools

In [ ]:

# Performance of query()
# DataFrame.query() using numexpr is slightly faster than Python for large frames
# Note : You will only see the performance benefits of using the numexpr engine with DataFrame.query()
# if your frame has more than approximately 200,000 rows

# query() 效能在大数据时高于数字表达式

In [ ]:

# Duplicate Data
# 识别和剔除重复数据,两个方法:duplicated and drop_duplicates,他们的参数都是列
# duplicated 返回布尔向量,标示重复的行
# drop_duplicates 删除重复列
# 默认保留第一个找到的值,但可以通过keep参数指定保留的值
# keep=‘first‘ (default): mark / drop duplicates except for the first occurrence. 只保留第一个
# keep=‘last‘: mark / drop duplicates except for the last occurrence. 只保留最后一个重复值
# keep=False: mark / drop all duplicates.  剔除所有重复值

In [336]:

df2 = pd.DataFrame({‘a‘: [‘one‘, ‘one‘, ‘two‘, ‘two‘, ‘two‘, ‘three‘, ‘four‘],
                    ‘b‘: [‘x‘, ‘y‘, ‘x‘, ‘y‘, ‘x‘, ‘x‘, ‘x‘],
                    ‘c‘: np.random.randn(7)})
df2

Out[336]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c
0 one x 2.206877
1 one y -1.852209
2 two x -0.706555
3 two y -1.007860
4 two x -0.185356
5 three x -0.687592
6 four x -2.052029

In [338]:

df2.duplicated(‘a‘)
df2.duplicated("a", keep="last")
df2.duplicated(‘a‘, keep=False)

Out[338]:

0    False
1     True
2    False
3     True
4     True
5    False
6    False
dtype: bool

Out[338]:

0     True
1    False
2     True
3     True
4    False
5    False
6    False
dtype: bool

Out[338]:

0     True
1     True
2     True
3     True
4     True
5    False
6    False
dtype: bool

In [339]:

df2.drop_duplicates(‘a‘)
df2.drop_duplicates(‘a‘, keep="last")
df2.drop_duplicates(‘a‘, keep=False)

Out[339]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c
0 one x 2.206877
2 two x -0.706555
5 three x -0.687592
6 four x -2.052029

Out[339]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c
1 one y -1.852209
4 two x -0.185356
5 three x -0.687592
6 four x -2.052029

Out[339]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c
5 three x -0.687592
6 four x -2.052029

In [340]:

# 传入一个列表作为参数
df2.duplicated([‘a‘, ‘b‘])  # a b 两列看做一个整体,标示重复值
df2.drop_duplicates([‘a‘, ‘b‘])

Out[340]:

0    False
1    False
2    False
3    False
4     True
5    False
6    False
dtype: bool

Out[340]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c
0 one x 2.206877
1 one y -1.852209
2 two x -0.706555
3 two y -1.007860
5 three x -0.687592
6 four x -2.052029

In [342]:

# index索引去重  index.duplicated
df3 = pd.DataFrame({‘a‘: np.arange(6),‘b‘: np.random.randn(6)},index=[‘a‘, ‘a‘, ‘b‘, ‘c‘, ‘b‘, ‘a‘])
df3

Out[342]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b
a 0 1.446937
a 1 -1.740284
b 2 -0.604590
c 3 0.096239
b 4 0.823314
a 5 1.990803

In [343]:

df3.index.duplicated()
df3[~df3.index.duplicated()]
df3[~df3.index.duplicated(keep=‘last‘)]
df3[~df3.index.duplicated(keep=False)]

Out[343]:

array([False,  True, False, False,  True,  True])

Out[343]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b
a 0 1.446937
b 2 -0.604590
c 3 0.096239

Out[343]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b
c 3 0.096239
b 4 0.823314
a 5 1.990803

Out[343]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b
c 3 0.096239

In [344]:

# Dictionary-like get() method get方法
# Each of Series, DataFrame, and Panel have a get method which can return a default value.
s = pd.Series([1,2,3], index=[‘a‘,‘b‘,‘c‘])
s.get("a")  # 相当于s["a"]
s.get("x", default=-1)  # 可以对不存在的index赋值

Out[344]:

1

Out[344]:

-1

In [345]:

# The lookup() Method
# 按一定的顺序取得行/列的值
dflookup = pd.DataFrame(np.random.rand(20,4), columns = [‘A‘,‘B‘,‘C‘,‘D‘])
dflookup

Out[345]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B C D
0 0.942679 0.727316 0.658345 0.465770
1 0.437278 0.225158 0.436522 0.164805
2 0.270947 0.280223 0.309800 0.015967
3 0.559836 0.630962 0.673678 0.712503
4 0.535372 0.989887 0.661567 0.361962
5 0.726322 0.601192 0.547858 0.477509
6 0.829411 0.583613 0.871647 0.460966
7 0.365722 0.563660 0.164954 0.134314
8 0.817334 0.523003 0.684492 0.369386
9 0.710906 0.693633 0.618877 0.888263
10 0.026953 0.185217 0.746235 0.568846
11 0.192765 0.927200 0.431736 0.084300
12 0.988460 0.784320 0.180145 0.039405
13 0.233349 0.148678 0.888210 0.004917
14 0.105130 0.146724 0.261370 0.936558
15 0.701224 0.791860 0.420083 0.391538
16 0.290186 0.307993 0.139429 0.618879
17 0.182132 0.174420 0.845501 0.647986
18 0.732009 0.919950 0.197361 0.582814
19 0.568096 0.539125 0.269016 0.537584

In [347]:

list(range(0,10,2))
dflookup.lookup(list(range(0,10,2)), [‘B‘,‘C‘,‘A‘,‘B‘,‘D‘])

Out[347]:

[0, 2, 4, 6, 8]

Out[347]:

array([0.72731646, 0.30979986, 0.53537223, 0.58361289, 0.36938598])

In [348]:

# index objets 索引对象

# 索引可以通过list或其他序列对象直接创建
index = pd.Index([‘e‘, ‘d‘, ‘a‘, ‘b‘])
index

# 可以命名
index = pd.Index([‘e‘, ‘d‘, ‘a‘, ‘b‘], name=‘something‘)
index.name
index

Out[348]:

Index([‘e‘, ‘d‘, ‘a‘, ‘b‘], dtype=‘object‘)

Out[348]:

‘something‘

Out[348]:

Index([‘e‘, ‘d‘, ‘a‘, ‘b‘], dtype=‘object‘, name=‘something‘)

In [349]:

index = pd.Index(list(range(5)), name=‘rows‘)
index
columns = pd.Index([‘A‘, ‘B‘, ‘C‘], name=‘cols‘)
columns

Out[349]:

Int64Index([0, 1, 2, 3, 4], dtype=‘int64‘, name=‘rows‘)

Out[349]:

Index([‘A‘, ‘B‘, ‘C‘], dtype=‘object‘, name=‘cols‘)

In [350]:

df = pd.DataFrame(np.random.randn(5, 3), index=index, columns=columns)  # 使用索引给列命名,列名是一个索引对象
df

Out[350]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

cols A B C
rows      
0 1.868165 0.704614 -2.049472
1 -0.878810 0.706876 -0.741121
2 -2.649523 -0.952211 0.806387
3 0.369280 -0.052788 -0.995775
4 0.218246 -0.034493 -0.198815

In [351]:

# Setting metadata 设置元数据
# 索引“多半”是“不可变”,但是可以设置和改变其元数据,比如索引的名称,或者,多重索引的级别和标签
# 可以使用 rename, set_names, set_levels, and set_labels 设置这些属性。
# 默认返回一个拷贝(不修改原值),也可以就地修改in place
ind = pd.Index([1, 2, 3])
ind

Out[351]:

Int64Index([1, 2, 3], dtype=‘int64‘)

In [359]:

ind.name = "ind"
ind
ind.rename("apple")
ind
ind.name = "apple"
ind
ind.set_names(["bob"], inplace=True)
ind

Out[359]:

Int64Index([1, 2, 3], dtype=‘int64‘, name=‘ind‘)

Out[359]:

Int64Index([1, 2, 3], dtype=‘int64‘, name=‘apple‘)

Out[359]:

Int64Index([1, 2, 3], dtype=‘int64‘, name=‘ind‘)

Out[359]:

Int64Index([1, 2, 3], dtype=‘int64‘, name=‘apple‘)

Out[359]:

Int64Index([1, 2, 3], dtype=‘int64‘, name=‘bob‘)

In [361]:

# set_names, set_levels, and set_labels also take an optional level` argument
# df.query(‘ilevel_0 == "red"‘) 在query中使用 ilevel_0 ……
index = pd.MultiIndex.from_product([range(3), [‘one‘, ‘two‘]], names=[‘first‘, ‘second‘])
index

Out[361]:

MultiIndex(levels=[[0, 1, 2], [‘one‘, ‘two‘]],
           labels=[[0, 0, 1, 1, 2, 2], [0, 1, 0, 1, 0, 1]],
           names=[‘first‘, ‘second‘])

In [362]:

index.levels[1]
index.levels[0]
index.set_levels(["a", "b"], level=1)

Out[362]:

Index([‘one‘, ‘two‘], dtype=‘object‘, name=‘second‘)

Out[362]:

Int64Index([0, 1, 2], dtype=‘int64‘, name=‘first‘)

Out[362]:

MultiIndex(levels=[[0, 1, 2], [‘a‘, ‘b‘]],
           labels=[[0, 0, 1, 1, 2, 2], [0, 1, 0, 1, 0, 1]],
           names=[‘first‘, ‘second‘])

In [366]:

# Set operations on Index objects 索引对象中的集合操作
# Note: The resulting index from a set operation will be sorted in ascending order.
# 注意: 索引的集合操作返回的是升序排序后的结果
a = pd.Index([‘c‘, ‘b‘, ‘a‘])
b = pd.Index([‘c‘, ‘e‘, ‘d‘])
a | b  # 并集
a & b  # 交集
# a - b  # 不支持
a.difference(b)  # 差集,非对称
a.symmetric_difference(b)  # 对称差集,相当于idx1.difference(idx2).union(idx2.difference(idx1))
a ^ b  # 对称差集

Out[366]:

Index([‘a‘, ‘b‘, ‘c‘, ‘d‘, ‘e‘], dtype=‘object‘)

Out[366]:

Index([‘c‘], dtype=‘object‘)

Out[366]:

Index([‘a‘, ‘b‘], dtype=‘object‘)

Out[366]:

Index([‘a‘, ‘b‘, ‘d‘, ‘e‘], dtype=‘object‘)

Out[366]:

Index([‘a‘, ‘b‘, ‘d‘, ‘e‘], dtype=‘object‘)

In [367]:

# Missing values 缺失值
# 注意:索引能够容纳缺失值,但是应该避免这样的情况。因为可能出现不可预料的结果,例如有些操作默认排除缺失值。

idx1 = pd.Index([1, np.nan, 3, 4])
idx1

Out[367]:

Float64Index([1.0, nan, 3.0, 4.0], dtype=‘float64‘)

In [368]:

idx1.fillna(2)  # 缺失值赋值为2,nan的index赋值为2

Out[368]:

Float64Index([1.0, 2.0, 3.0, 4.0], dtype=‘float64‘)

In [372]:

idx2 = pd.DatetimeIndex([pd.Timestamp(‘2011-01-01‘), pd.NaT, pd.Timestamp(‘2011-01-03‘)])  # pd的缺失值是NaT,与np不同
idx2

Out[372]:

DatetimeIndex([‘2011-01-01‘, ‘NaT‘, ‘2011-01-03‘], dtype=‘datetime64[ns]‘, freq=None)

In [373]:

idx2.fillna(pd.Timestamp(‘2011-01-02‘))

Out[373]:

DatetimeIndex([‘2011-01-01‘, ‘2011-01-02‘, ‘2011-01-03‘], dtype=‘datetime64[ns]‘, freq=None)

In [398]:

# Set / Reset Index 设置/重设索引

# DataFrame
data = pd.DataFrame({"a":["bar", "bar", "foo", "foo"],
                    "b":["one","two","one","two"],
                    "c":["z","y","x", "w"],
                    "d":range(1,5)})  # range 不用list
data

Out[398]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c d
0 bar one z 1
1 bar two y 2
2 foo one x 3
3 foo two w 4

In [377]:

indexed1 = data.set_index("c")  # 把df的某列设置为index索引
indexed1

Out[377]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b d
c      
z bar one 1
y bar two 2
x foo one 3
w foo two 4

In [378]:

indexed2 = data.set_index([‘a‘, ‘b‘])  # 把df的多列设置为多重索引
indexed2

Out[378]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

    c d
a b    
bar one z 1
two y 2
foo one x 3
two w 4

In [379]:

frame = data.set_index(‘c‘, drop=False)  # drop参数,可以设置索引时不删除列,默认为删除列
frame
frame = frame.set_index([‘a‘, ‘b‘], append=True)  # append参数,在原有索引的基础上,增加索引,变成复合索引
frame

Out[379]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c d
c        
z bar one z 1
y bar two y 2
x foo one x 3
w foo two w 4

Out[379]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

      c d
c a b    
z bar one z 1
y bar two y 2
x foo one x 3
w foo two w 4

In [380]:

data.set_index(‘c‘, drop=False)  # 把某列设为索引,但不删除
data
data.set_index([‘a‘, ‘b‘], inplace=True)  # 就地修改,而不是返回拷贝
data

Out[380]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c d
c        
z bar one z 1
y bar two y 2
x foo one x 3
w foo two w 4

Out[380]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c d
0 bar one z 1
1 bar two y 2
2 foo one x 3
3 foo two w 4

Out[380]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

    c d
a b    
bar one z 1
two y 2
foo one x 3
two w 4

In [381]:

# Reset the index 重置索引
# Note: The reset_index method used to be called delevel which is now deprecated. 不推荐使用delevel

data
data.index.name  # 无返回值?
data.index.names  # 索引列的名称
data.reset_index()  # 重置索引,原索引变为普通列,原索引名称变为列名

Out[381]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

    c d
a b    
bar one z 1
two y 2
foo one x 3
two w 4

Out[381]:

FrozenList([‘a‘, ‘b‘])

Out[381]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c d
0 bar one z 1
1 bar two y 2
2 foo one x 3
3 foo two w 4

In [382]:

frame
frame.reset_index(level=1)  # 对于多重索引,可以指定重置哪一级索引,而不是全部重置

Out[382]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

      c d
c a b    
z bar one z 1
y bar two y 2
x foo one x 3
w foo two w 4

Out[382]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

    a c d
c b      
z one bar z 1
y two bar y 2
x one foo x 3
w two foo w 4

In [385]:

# reset_index方法可以使用drop参数,若其为true,则仅是把索引剔除,而不转换为df数据列
frame
frame.reset_index(level=2, drop=True)

Out[385]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

      c d
c a b    
z bar one z 1
y bar two y 2
x foo one x 3
w foo two w 4

Out[385]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

    c d
c a    
z bar z 1
y bar y 2
x foo x 3
w foo w 4

In [399]:

# Adding an ad hoc index
# If you create an index yourself, you can just assign it to the index field
# 创建index对象,并赋值给df
index = pd.MultiIndex.from_product([range(2), [‘one‘, ‘two‘]], names=[‘first‘, ‘second‘])
index
data
data.index = index  # 注意:index的长度要与df向适应
data

Out[399]:

MultiIndex(levels=[[0, 1], [‘one‘, ‘two‘]],
           labels=[[0, 0, 1, 1], [0, 1, 0, 1]],
           names=[‘first‘, ‘second‘])

Out[399]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a b c d
0 bar one z 1
1 bar two y 2
2 foo one x 3
3 foo two w 4

Out[399]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

    a b c d
first second        
0 one bar one z 1
two bar two y 2
1 one foo one x 3
two foo two w 4

In [ ]:

# Returning a view versus a copy 返回视图 对比 返回拷贝
# 避免链式操作,即多个连接的[],具体见前面的说明

# Why does assignment fail when using chained indexing? 为什么链式索引赋值失败
# python解释器,对以下赋值的区别

# 第一种:非链式赋值
dfmi.loc[:,(‘one‘,‘second‘)] = value
# becomes, python解释为:
dfmi.loc.__setitem__((slice(None), (‘one‘, ‘second‘)), value)  # 直接set
# Of course, dfmi.loc.__getitem__(idx) may be a view or a copy of dfmi.

# 第二种:链式赋值
dfmi[‘one‘][‘second‘] = value  # pd会抛出异常SettingWithCopy,链式操作具有不确定性!
# becomes, python解释为:
dfmi.__getitem__(‘one‘).__setitem__(‘second‘, value)  # 先get,再set,前面的get返回的是一个copy

In [ ]:

# SettingWithCopy有时候会在没有明显的链式操作的情况下出现,例如:
def do_something(df):
   foo = df[[‘bar‘, ‘baz‘]]  # Is foo a view? A copy? Nobody knows!
   # ... many lines here ...
   foo[‘quux‘] = value       # We don‘t know whether this will modify df or not!  # “隐式”的链式操作
   return foo

In [400]:

# Evaluation order matters 赋值命令事情
# 链式赋值操作引起的SettingWithCopyWarning,可以通过设置option mode取消或抑制。

dfb = pd.DataFrame({‘a‘ : [‘one‘, ‘one‘, ‘two‘,‘three‘, ‘two‘, ‘one‘, ‘six‘],‘c‘ : np.arange(7)})
dfb

Out[400]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a c
0 one 0
1 one 1
2 two 2
3 three 3
4 two 4
5 one 5
6 six 6

In [401]:

# This will show the SettingWithCopyWarning
# but the frame values will be set
dfb[‘c‘][dfb.a.str.startswith(‘o‘)] = 42
dfb
d:\python\36-64\lib\site-packages\ipykernel_launcher.py:3: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
  This is separate from the ipykernel package so we can avoid doing imports until

Out[401]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  a c
0 one 42
1 one 42
2 two 2
3 three 3
4 two 4
5 one 42
6 six 6

In [ ]:

# This however is operating on a copy and will not work.
# 把option的提示级别由warn改为raise ????
pd.set_option(‘mode.chained_assignment‘,‘warn‘)  # This however is operating on a copy and will not work. # ??

In [402]:

# A chained assignment can also crop up in setting in a mixed dtype frame. 出现在
# Note : These setting rules apply to all of .loc/.iloc 

# This is the correct access method 正确的存取方法
dfc = pd.DataFrame({‘A‘:[‘aaa‘,‘bbb‘,‘ccc‘],‘B‘:[1,2,3]})
dfc
dfc.loc[0,‘A‘] = 11
dfc

Out[402]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B
0 aaa 1
1 bbb 2
2 ccc 3

Out[402]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B
0 11 1
1 bbb 2
2 ccc 3

In [403]:

dfc = dfc.copy()
dfc
dfc[‘A‘][0] = 111  # This can work at times, but is not guaranteed, and so should be avoided 有时可以工作,但不保证,应避免使用
dfc

Out[403]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B
0 11 1
1 bbb 2
2 ccc 3
d:\python\36-64\lib\site-packages\ipykernel_launcher.py:3: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
  This is separate from the ipykernel package so we can avoid doing imports until

Out[403]:

.dataframe tbody tr th:only-of-type { vertical-align: middle }
.dataframe tbody tr th { vertical-align: top }
.dataframe thead th { text-align: right }

  A B
0 111 1
1 bbb 2
2 ccc 3

In [ ]:

pd.set_option(‘mode.chained_assignment‘, ‘raise‘)  # 链式赋值将不会执行

In [ ]:

# http://pandas.pydata.org/pandas-docs/stable/indexing.html 全文完
# 2018-02-19

原文地址:https://www.cnblogs.com/shigubuhua/p/8454365.html

时间: 2024-11-05 18:36:58

pandas索引index的相关文章

Oracle之索引(Index)实例讲解 - 基础

Oracle之索引(Index)实例讲解 - 基础 索引(Index)是关系数据库中用于存放表中每一条记录位置的一种对象,主要目的是加快数据的读取速度和数据的完整性检查.索引的建立是一项技术性要求非常高的工作. 一般在数据库设计阶段就要考虑到如何设计和创建索引. 1. 创建索引 创建索引的语法: CREATE [UNIQUE] INDEX [schema.] index ON [schema.] table (column [ASC | DESC], column [ASC | DESC]...

Handlebars.js循环中索引(@index)使用技巧(访问父级索引)

使用Handlebars.js过程中,难免会使用循环,比如构造数据表格.而使用循环,又经常会用到索引,也就是获取当前循环到第几次了,一般会以这个为序号显示在页面上. Handlebars.js中获取循环索引很简单,只需在循环中使用{{@index}}即可. 1 <!DOCTYPE html> 2 <html> 3 <head> 4 <META http-equiv=Content-Type content="text/html; charset=utf-

SQL Server 索引(index) 和 视图(view) 的简单介绍和操作

--索引(index)和视图(view)-- --索引(index)----概述: 数据库中的索引类似于书籍的目录,他以指针形式包含了表中一列或几列组合的新顺序,实现表中数据库的逻辑排序.索引创建在数据表或者视图的字段上,生成索引页,存放于数据库中.--分类:在SQL Server中,根据索引的作用和存储方式的不同,将索引分为聚集索引和非聚集索引两类. 1)聚集索引 :指数据库的物理顺序与被创建索引的字段顺序完全相同.同一个数据表最多只能创建一个聚集索引.默认情况下主键自动被创建为聚集索引.聚集

PLSQL_性能优化索引Index介绍(概念)

2014-06-01 BaoXinjian In Capgemini 一.摘要 在PLSQL查询优化中,使用和接触最多的应该是索引Index这个概念,个人也觉得对Index选择和优化是程式优化过程中比较重要的概念,特别是刚开始接触PLSQL性能优化 索引的一些概念 一个索引可以由一个或多个列组成, 对列设置索引其实就是对列的内容按一定的方式进行排序,检索数据的时候,检索排过序的数据,检索到最后一个有效数据之后就跳出检索 这样就不必进行全表扫描了,同时可以应用很多算法提高检索效率 数据库多用二分法

关于分区技术的索引 index

分区系列篇: 关于oracle分区技术--初了解  http://blog.csdn.net/wanghui5767260/article/details/39158873 关于分区技术的索引:           http://blog.csdn.net/wanghui5767260/article/details/39181027 关于分区技术---索引 Index 一.   分区索引分类: 本地前缀分区索引(local prefixedpartitioned index) 全局分区索引(g

pandas索引的数据查找、排序和去重小结

由于Pandas的索引比较复杂,常常在使用过程中容易搞混,所以整理一份关于索引的查找.排序.去重的总结文档. import pandas as pd import numpy as np #定义DataFrame dict={'a':[1,2,3],'b':[4,5,6],'c':[7,8,9]} df=pd.DataFrame(dict,index=['one','two','three']) df .dataframe tbody tr th:only-of-type { vertical-

pandas索引操作

pandas的索引操作可以快速的完成多种功能. import pandas as pd import numpy as np 1. 首先pandas创建DataFrame df_1 = pd.DataFrame([['Jack','M',40],['Tony','M',20],['Mary','F',30],['Bob','M',25]], columns=['name','gender','age']) #列表创建DataFrame print('------ df_1是: ------')

第十节 pandas索引的增删改查

import pandas as pd pd.options.display.max_rows = 10 # 设置显示行数 #读入是直接指定索引 df1 = pd.read_csv(r'E:\anacondatest\PythonData\高校信息.csv', encoding='gbk', index_col='学校名称') print(df1) #生成复合索引 df2 = pd.read_csv(r'E:\anacondatest\PythonData\高校信息.csv', encoding

数据库中的索引Index

索引就像一本书的目录,而书中的索引是对一个词语的列表,其中注明了包含各个词的页码.数据库中的索引 是某一个表中一列或者若干列值的集合和相应的只想表中物理标识这些值的数据页的逻辑指针清单. 索引的作用: 1.通过创建唯一索引,可以保证数据记录的唯一性: 2.可以大大的加快数据检索的速度: 3.可以加速表与表之间的连接: 4.在使用ORDER BY 和GROUP BY 子句中进行检索数据是,可以显著减少查询中分组和排序的时间: 5.使用索引可以在检索数据的过程中使用优化隐藏器,提高系统性能: 索引分