@ -2720,8 +2720,8 @@ c <span class="hljs-number">6</span> <span class="hljs-number">7</span>
<li><strong>All methods operate on columns by default. Pass <codeclass="python hljs"><spanclass="hljs-string">'axis=1'</span></code> to process the rows instead.</strong></li>
<li><strong>Fifth result's columns are indexed with a multi-index. This means we need a tuple of column keys to specify a column: <codeclass="python hljs"><spanclass="hljs-string">'<DF>.loc[row_key, (col_key_1, col_key_2)]'</span></code>.</strong></li>
</ul>
<div><h4id="dataframemultiindex">DataFrame — Multi-Index:</h4><pre><codeclass="python language-python hljs"><DF> = <DF>.xs(row_key, level=<int>) <spanclass="hljs-comment"># Rows with key on passed level of multi-index.</span>
<DF> = <DF>.xs(row_keys, level=<ints>) <spanclass="hljs-comment"># Rows that have first key on first level, etc.</span>
<div><h4id="dataframemultiindex">DataFrame — Multi-Index:</h4><pre><codeclass="python language-python hljs"><DF> = <DF>.xs(key, level=<int>)<spanclass="hljs-comment"># Rows with key on passed level of multi-index.</span>
<DF> = <DF>.xs(keys, level=<ints>, axis=<spanclass="hljs-number">1</span>)<spanclass="hljs-comment"># Cols that have first key on first level, etc.</span>
<DF> = <DF>.set_index(col_keys) <spanclass="hljs-comment"># Combines multiple columns into a multi-index.</span>
<S/DF> = <DF>.stack/unstack(level=<spanclass="hljs-number">-1</span>) <spanclass="hljs-comment"># Combines col keys with row keys or vice versa.</span>