* **`'quoting'` - 0: As necessary, 1: All, 2: All but numbers which are read as floats, 3: None.**
@ -3186,14 +3186,14 @@ Name: a, dtype: int64
```python
<S> = <S>.head/describe/sort_values() # Also <S>.unique/value_counts/round/dropna().
<S> = <S>.str.strip/lower/contains/replace() # Also split().str[<int>] and split().explode().
<S> = <S>.str.strip/lower/contains/replace() # Also split().str[i] or split(expand=True).
<S> = <S>.dt.year/month/day/hour # Use pd.to_datetime(<S>) to get S of dates.
```
```python
<S>.plot.line/area/bar/pie/hist() # Generates a plot. `plt.show()` displays it.
```
* **Also: `'pd.cut(<S>, bins=<int/coll>)'` and `'<S>.quantile(<float/coll>)'`.**
* **Also`'<S>.quantile(<float/coll>)'` and `'pd.cut(<S>, bins=<int/coll>)'`.**
* **Indexing objects can't be tuples because `'obj[x, y]'` is converted to `'obj[(x, y)]'`.**
* **Pandas uses NumPy types like `'np.int64'`. Series is converted to `'float64'` if we assign np.nan to any item. Use `'<S>.astype(<str/type>)'` to get converted Series.**
* **Series will silently overflow if we run `'pd.Series([100], dtype="int8") + 100'`!**
@ -3255,7 +3255,7 @@ b 3 4
```
```python
<DF> = <DF> > <el/S/DF> # Returns DF of bools. S is treated as a row.
<DF> = <DF> > <el/S/DF> # Returns DF of bools. Treats series as a row.
<DF> = <DF> + <el/S/DF> # Items with non-matching keys get value NaN.
* **All methods operate on columns by default. Pass `'axis=1'` to process the rows instead.**
* **Listed methods process the columns unless they receive `'axis=1'`. Exceptions to this rule are `'<DF>.dropna()'`, `'<DF>.drop(row_key/s)'` and `'<DF>.rename(<dict/func>)'`.**
* **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)]'`.**
<li><strong><codeclass="python hljs"><spanclass="hljs-string">'dialect'</span></code> - Master parameter that sets the default values. String or a 'csv.Dialect' object.</strong></li>
<li><strong><codeclass="python hljs"><spanclass="hljs-string">'delimiter'</span></code> - A one-character string used to separate fields.</strong></li>
<li><strong><codeclass="python hljs"><spanclass="hljs-string">'lineterminator'</span></code> - How writer terminates rows. Reader is hardcoded to '\n', '\r', '\r\n'.</strong></li>
<li><strong><codeclass="python hljs"><spanclass="hljs-string">'quotechar'</span></code> - Character for quoting fields that contain special characters.</strong></li>
<li><strong><codeclass="python hljs"><spanclass="hljs-string">'lineterminator'</span></code> - How writer terminates rows. Reader looks for '\n', '\r' and '\r\n'.</strong></li>
<li><strong><codeclass="python hljs"><spanclass="hljs-string">'quotechar'</span></code> - Character for quoting fields containing delimiters, quotechars, '\n' or '\r'.</strong></li>
<li><strong><codeclass="python hljs"><spanclass="hljs-string">'escapechar'</span></code> - Character for escaping quotechars.</strong></li>
<li><strong><codeclass="python hljs"><spanclass="hljs-string">'quoting'</span></code> - 0: As necessary, 1: All, 2: All but numbers which are read as floats, 3: None.</strong></li>
@ -2595,13 +2595,13 @@ Name: a, dtype: int64
<S> = <S> + <el/S><spanclass="hljs-comment"># Items with non-matching keys get value NaN.</span>
</code></pre>
<pre><codeclass="python language-python hljs"><S> = <S>.head/describe/sort_values() <spanclass="hljs-comment"># Also <S>.unique/value_counts/round/dropna().</span>
<S> = <S>.str.strip/lower/contains/replace() <spanclass="hljs-comment"># Also split().str[<int>] and split().explode().</span>
<S> = <S>.str.strip/lower/contains/replace() <spanclass="hljs-comment"># Also split().str[i] or split(expand=True).</span>
<S> = <S>.dt.year/month/day/hour <spanclass="hljs-comment"># Use pd.to_datetime(<S>) to get S of dates.</span>
</code></pre>
<pre><codeclass="python language-python hljs"><S>.plot.line/area/bar/pie/hist() <spanclass="hljs-comment"># Generates a plot. `plt.show()` displays it.</span>
</code></pre>
<ul>
<li><strong>Also:<codeclass="python hljs"><spanclass="hljs-string">'pd.cut(<S>, bins=<int/coll>)'</span></code> and <codeclass="python hljs"><spanclass="hljs-string">'<S>.quantile(<float/coll>)'</span></code>.</strong></li>
<li><strong>Also <codeclass="python hljs"><spanclass="hljs-string">'<S>.quantile(<float/coll>)'</span></code> and <codeclass="python hljs"><spanclass="hljs-string">'pd.cut(<S>, bins=<int/coll>)'</span></code>.</strong></li>
<li><strong>Indexing objects can't be tuples because <codeclass="python hljs"><spanclass="hljs-string">'obj[x, y]'</span></code> is converted to <codeclass="python hljs"><spanclass="hljs-string">'obj[(x, y)]'</span></code>.</strong></li>
<li><strong>Pandas uses NumPy types like <codeclass="python hljs"><spanclass="hljs-string">'np.int64'</span></code>. Series is converted to <codeclass="python hljs"><spanclass="hljs-string">'float64'</span></code> if we assign np.nan to any item. Use <codeclass="python hljs"><spanclass="hljs-string">'<S>.astype(<str/type>)'</span></code> to get converted Series.</strong></li>
<li><strong>Series will silently overflow if we run <codeclass="python hljs"><spanclass="hljs-string">'pd.Series([100], dtype="int8") + 100'</span></code>!</strong></li>
@ -2650,7 +2650,7 @@ b <span class="hljs-number">3</span> <span class="hljs-number">4</span>
<DF> = <DF>[<S_of_bools>] <spanclass="hljs-comment"># Filters rows. For example `df[df.x > 1]`.</span>
<DF> = <DF>[<DF_of_bools>] <spanclass="hljs-comment"># Assigns NaN to items that are False in bools.</span>
</code></pre>
<pre><codeclass="python language-python hljs"><DF> = <DF>><el/S/DF><spanclass="hljs-comment"># Returns DF of bools. S is treated as a row.</span>
<pre><codeclass="python language-python hljs"><DF> = <DF>><el/S/DF><spanclass="hljs-comment"># Returns DF of bools. Treats series as a row.</span>
<DF> = <DF> + <el/S/DF><spanclass="hljs-comment"># Items with non-matching keys get value NaN.</span>
@ -2719,7 +2719,7 @@ c <span class="hljs-number">6</span> <span class="hljs-number">7</span>
</code></pre>
<ul>
<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>Listed methods process the columns unless they receive <codeclass="python hljs"><spanclass="hljs-string">'axis=1'</span></code>. Exceptions to this rule are<codeclass="python hljs"><spanclass="hljs-string">'<DF>.dropna()'</span></code>, <codeclass="python hljs"><spanclass="hljs-string">'<DF>.drop(row_key/s)'</span></code> and <codeclass="python hljs"><spanclass="hljs-string">'<DF>.rename(<dict/func>)'</span></code>.</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>