|
55 | 55 |
|
56 | 56 | <body> |
57 | 57 | <header> |
58 | | - <aside>December 24, 2024</aside> |
| 58 | + <aside>December 25, 2024</aside> |
59 | 59 | <a href="https://gto76.github.io" rel="author">Jure Šorn</a> |
60 | 60 | </header> |
61 | 61 |
|
|
1294 | 1294 | <li><strong>Each item is printed on its own line if collection exceeds 'width' characters.</strong></li> |
1295 | 1295 | <li><strong>Nested collections that are 'depth' levels deep get printed as '…'.</strong></li> |
1296 | 1296 | </ul> |
1297 | | -<div><h2 id="input"><a href="#input" name="input">#</a>Input</h2><pre><code class="python language-python hljs"><str> = input([<obj>]) |
| 1297 | +<div><h2 id="input"><a href="#input" name="input">#</a>Input</h2><pre><code class="python language-python hljs"><str> = input() |
1298 | 1298 | </code></pre></div> |
1299 | 1299 |
|
1300 | 1300 | <ul> |
@@ -2601,9 +2601,9 @@ <h3 id="format-2">Format</h3><div><h4 id="forstandardtypesizesandmanualalignment |
2601 | 2601 | <pre><code class="python language-python hljs"><S>.plot.line/area/bar/pie/hist() <span class="hljs-comment"># Generates a plot. `plt.show()` displays it.</span> |
2602 | 2602 | </code></pre> |
2603 | 2603 | <ul> |
2604 | | -<li><strong>Indexing objects can't be tuples because <code class="python hljs"><span class="hljs-string">'obj[x, y]'</span></code> is converted to <code class="python hljs"><span class="hljs-string">'obj[(x, y)]'</span></code>!</strong></li> |
| 2604 | +<li><strong>Indexing objects can't be tuples because <code class="python hljs"><span class="hljs-string">'obj[x, y]'</span></code> is converted to <code class="python hljs"><span class="hljs-string">'obj[(x, y)]'</span></code>.</strong></li> |
2605 | 2605 | <li><strong>Pandas uses NumPy types like <code class="python hljs"><span class="hljs-string">'np.int64'</span></code>. Series is converted to <code class="python hljs"><span class="hljs-string">'float64'</span></code> if we assign np.nan to any item. Use <code class="python hljs"><span class="hljs-string">'<S>.astype(<str/type>)'</span></code> to get converted Series.</strong></li> |
2606 | | -<li><strong>Series will silently overflow if we run <code class="python hljs"><span class="hljs-string">'pd.Series([100], dtype="int8") + 100'</span></code>.</strong></li> |
| 2606 | +<li><strong>Series will silently overflow if we run <code class="python hljs"><span class="hljs-string">'pd.Series([100], dtype="int8") + 100'</span></code>!</strong></li> |
2607 | 2607 | </ul> |
2608 | 2608 | <div><h4 id="seriesaggregatetransformmap">Series — Aggregate, Transform, Map:</h4><pre><code class="python language-python hljs"><el> = <S>.sum/max/mean/idxmax/all() <span class="hljs-comment"># Or: <S>.agg(lambda <S>: <el>)</span> |
2609 | 2609 | <S> = <S>.rank/diff/cumsum/ffill/interpol…() <span class="hljs-comment"># Or: <S>.agg/transform(lambda <S>: <S>)</span> |
@@ -2772,7 +2772,7 @@ <h3 id="format-2">Format</h3><div><h4 id="forstandardtypesizesandmanualalignment |
2772 | 2772 | <span class="hljs-number">6</span> <span class="hljs-number">11</span> <span class="hljs-number">13</span></code></pre></div> |
2773 | 2773 |
|
2774 | 2774 | <div><h3 id="rolling">Rolling</h3><p><strong>Object for rolling window calculations.</strong></p><pre><code class="python language-python hljs"><RS/RDF/RGB> = <S/DF/GB>.rolling(win_size) <span class="hljs-comment"># Also: `min_periods=None, center=False`.</span> |
2775 | | -<RS/RDF/RGB> = <RDF/RGB>[col_key/s] <span class="hljs-comment"># Or: <RDF/RGB>.col_key</span> |
| 2775 | +<RS/RDF/RGB> = <RDF/RGB>[col_key/s] <span class="hljs-comment"># Or: <RDF/RGB>.<col_key></span> |
2776 | 2776 | <S/DF> = <R>.mean/sum/max() <span class="hljs-comment"># Or: <R>.apply/agg(<agg_func/str>)</span> |
2777 | 2777 | </code></pre></div> |
2778 | 2778 |
|
@@ -2934,7 +2934,7 @@ <h3 id="format-2">Format</h3><div><h4 id="forstandardtypesizesandmanualalignment |
2934 | 2934 |
|
2935 | 2935 |
|
2936 | 2936 | <footer> |
2937 | | - <aside>December 24, 2024</aside> |
| 2937 | + <aside>December 25, 2024</aside> |
2938 | 2938 | <a href="https://gto76.github.io" rel="author">Jure Šorn</a> |
2939 | 2939 | </footer> |
2940 | 2940 |
|
|
0 commit comments