* **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'`!**
<pre><codeclass="python language-python hljs"><S> = <S>><el/S><spanclass="hljs-comment"># Returns S of bools. For logic use &, |, ~.</span>
<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/copy/sort_values() <spanclass="hljs-comment"># Also <S>.unique/value_counts/round/dropna().</span>
<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>.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>
<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>
@ -2627,7 +2628,6 @@ Name: a, dtype: int64
</code></pre>
<ul>
<li><strong>Methods sort_values(), dropna(), ffill(), interpolate() and fillna() accept <codeclass="python hljs"><spanclass="hljs-string">'inplace=True'</span></code>.</strong></li>
<li><strong>Agg() and transform() pass a Series to a function if it raises Type/Val/AttrError on a scalar.</strong></li>
<li><strong>Last result has a multi-index. Use <codeclass="python hljs"><spanclass="hljs-string">'<S>[key_1, key_2]'</span></code> to get its values.</strong></li>