* **If eq() method is not overridden, it returns `'id(self) == id(other)'`, which is the same as `'self is other'`.**
* **That means all objects compare not equal by default.**
* **That means all user-defined objects compare not equal by default.**
* **Only the left side object has eq() method called, unless it returns NotImplemented, in which case the right object is consulted. False is returned if both return NotImplemented.**
* **Ne() automatically works on any object that has eq() defined.**
@ -3341,13 +3341,13 @@ c 6 7
* **All methods operate on columns by default. Pass `'axis=1'` to process the rows instead.**
* **Fifth result's columns are indexed with a multi-index. This means we need a tuple of column keys to specify a column: `'<DF>.loc[row_key, (col_key_1, col_key_2)]'`.**
#### DataFrame — Multi-Index:
### Multi-Index
```python
<DF>= <DF>.xs(key, level=<int>) # Rows with key on passed level of multi-index.
<DF>= <DF>.xs(keys, level=<ints>, axis=1) # Cols that have first key on first level, etc.
<DF>= <DF>.set_index(col_keys) # Creates index from cols. Also `append=False`.
<S/DF> = <DF>.stack/unstack(level=-1) # Combines col keys with row keys or vice versa.
@ -919,7 +919,7 @@ Point = make_dataclass(<span class="hljs-string">'Point'</span>, [(<span class="
<div><h2id="ducktypes"><ahref="#ducktypes"name="ducktypes">#</a>Duck Types</h2><p><strong>A duck type is an implicit type that prescribes a set of special methods. Any object that has those methods defined is considered a member of that duck type.</strong></p><div><h3id="comparable">Comparable</h3><ul>
<li><strong>If eq() method is not overridden, it returns <codeclass="python hljs"><spanclass="hljs-string">'id(self) == id(other)'</span></code>, which is the same as <codeclass="python hljs"><spanclass="hljs-string">'self is other'</span></code>.</strong></li>
<li><strong>That means all objects compare not equal by default.</strong></li>
<li><strong>That means all user-defined objects compare not equal by default.</strong></li>
<li><strong>Only the left side object has eq() method called, unless it returns NotImplemented, in which case the right object is consulted. False is returned if both return NotImplemented.</strong></li>
<li><strong>Ne() automatically works on any object that has eq() defined.</strong></li>
@ -2722,11 +2722,11 @@ 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(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"># Creates index from cols. Also `append=False`.</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>
<S> = <DF>.stack/unstack(level=<spanclass="hljs-number">-1</span>) <spanclass="hljs-comment"># Combines col keys with row keys or vice versa.</span>
</code></pre></div>
<div><h3id="fileformats">File Formats</h3><pre><codeclass="python language-python hljs"><S/DF> = pd.read_json/pickle(<path/url/file>) <spanclass="hljs-comment"># Also accepts io.StringIO/BytesIO(<str/bytes>).</span>
@ -2931,7 +2931,7 @@ $ deactivate <span class="hljs-comment"># Deactivates the active