<pre><codeclass="bash hljs"><2d_bools> = <2d_array>><==<el/1d/2d_array><spanclass="hljs-comment"># 1d_array must have size of a row.</span>
<pre><codeclass="bash hljs"><2d_bools> = <2d_array>><el/1d/2d_array><spanclass="hljs-comment"># 1d_array must have size of a row.</span>
<1d/2d_a> = <2d_array>[<2d/1d_bools>] <spanclass="hljs-comment"># 1d_bools must have size of a column.</span>
<1d/2d_a> = <2d_array>[<2d/1d_bools>] <spanclass="hljs-comment"># 1d_bools must have size of a column.</span>
<pre><codeclass="python language-python hljs"><Sr> = <Sr>><==<el/Sr><spanclass="hljs-comment"># Returns a Series of bools.</span>
<Sr> = <Sr> +-*/<el/Sr><spanclass="hljs-comment"># Items with non-matching keys get value NaN.</span>
<pre><codeclass="python language-python hljs"><Sr> = <Sr>><el/Sr><spanclass="hljs-comment"># Returns a Series of bools.</span>
<Sr> = <Sr> + <el/Sr><spanclass="hljs-comment"># Items with non-matching keys get value NaN.</span>
</code></pre>
</code></pre>
<pre><codeclass="python language-python hljs"><Sr> = pd.concat(<coll_of_Sr>) <spanclass="hljs-comment"># Concats multiple Series into one long Series.</span>
<pre><codeclass="python language-python hljs"><Sr> = pd.concat(<coll_of_Sr>) <spanclass="hljs-comment"># Concats multiple Series into one long Series.</span>
<Sr> = <Sr>.combine_first(<Sr>) <spanclass="hljs-comment"># Adds items that are not yet present.</span>
<Sr> = <Sr>.combine_first(<Sr>) <spanclass="hljs-comment"># Adds items that are not yet present.</span>
@ -2641,15 +2641,15 @@ b <span class="hljs-number">3</span> <span class="hljs-number">4</span>
<DF> = <DF>[row_bools] <spanclass="hljs-comment"># Keeps rows as specified by bools.</span>
<DF> = <DF>[row_bools] <spanclass="hljs-comment"># Keeps rows as specified by bools.</span>
<DF> = <DF>[<DF_of_bools>] <spanclass="hljs-comment"># Assigns NaN to False values.</span>
<DF> = <DF>[<DF_of_bools>] <spanclass="hljs-comment"># Assigns NaN to values that are False in bools.</span>
</code></pre>
</code></pre>
<pre><codeclass="python language-python hljs"><DF> = <DF>><==<el/Sr/DF><spanclass="hljs-comment"># Returns DF of bools. Sr is treated as a row.</span>
<DF> = <DF> +-*/<el/Sr/DF><spanclass="hljs-comment"># Items with non-matching keys get value NaN.</span>
<pre><codeclass="python language-python hljs"><DF> = <DF>><el/Sr/DF><spanclass="hljs-comment"># Returns DF of bools. Sr is treated as a row.</span>
<DF> = <DF> + <el/Sr/DF><spanclass="hljs-comment"># Items with non-matching keys get value NaN.</span>
</code></pre>
</code></pre>
<pre><codeclass="python language-python hljs"><DF> = <DF>.set_index(column_key) <spanclass="hljs-comment"># Replaces row keys with values from a column.</span>
<pre><codeclass="python language-python hljs"><DF> = <DF>.set_index(column_key) <spanclass="hljs-comment"># Replaces row keys with values from the column.</span>
<DF> = <DF>.reset_index(drop=<spanclass="hljs-keyword">False</span>) <spanclass="hljs-comment"># Drops or moves row keys to column named index.</span>
<DF> = <DF>.reset_index(drop=<spanclass="hljs-keyword">False</span>) <spanclass="hljs-comment"># Drops or moves row keys to column named index.</span>
<DF> = <DF>.sort_index(ascending=<spanclass="hljs-keyword">True</span>) <spanclass="hljs-comment"># Sorts rows by row keys. Use `axis=1` for cols.</span>
<DF> = <DF>.sort_index(ascending=<spanclass="hljs-keyword">True</span>) <spanclass="hljs-comment"># Sorts rows by row keys. Use `axis=1` for cols.</span>
<DF> = <DF>.sort_values(column_key/s) <spanclass="hljs-comment"># Sorts rows by the passed column/s. Same.</span>
<DF> = <DF>.sort_values(column_key/s) <spanclass="hljs-comment"># Sorts rows by passed column/s. Also `axis=1`.</span>