You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<li><strong>Indexes should not be tuples because Python converts <codeclass="python hljs"><spanclass="hljs-string">'obj[i, j]'</span></code> to <codeclass="python hljs"><spanclass="hljs-string">'obj[(i, j)]'</span></code>!</strong></li>
2201
+
<li><strong><codeclass="python hljs"><spanclass="hljs-string">':'</span></code> returns a slice of all dimension's indexes. Omitted dimensions default to <codeclass="python hljs"><spanclass="hljs-string">':'</span></code>.</strong></li>
2201
2202
<li><strong>Any value that is broadcastable to the indexed shape can be assigned to the selection.</strong></li>
2202
2203
</ul>
2203
2204
<div><h3id="broadcasting">Broadcasting</h3><p><strong>Set of rules by which NumPy functions operate on arrays of different sizes and/or dimensions.</strong></p><pre><codeclass="python language-python hljs">left = [[<spanclass="hljs-number">0.1</span>], [<spanclass="hljs-number">0.6</span>], [<spanclass="hljs-number">0.8</span>]] <spanclass="hljs-comment"># Shape: (3, 1)</span>
<DF> = pd.read_csv/pickle/excel(<spanclass="hljs-string">'<path/url>'</span>) <spanclass="hljs-comment"># Use `sheet_name=None` to get all Excel sheets.</span>
2729
+
<DF> = pd.read_csv(<spanclass="hljs-string">'<path/url>'</span>) <spanclass="hljs-comment"># Also `names=<list>, parse_dates=False`.</span>
2730
+
<DF> = pd.read_pickle/excel(<spanclass="hljs-string">'<path/url>'</span>) <spanclass="hljs-comment"># Use `sheet_name=None` to get all Excel sheets.</span>
2731
2731
<DF> = pd.read_sql(<spanclass="hljs-string">'<table/query>'</span>, <conn.>) <spanclass="hljs-comment"># SQLite3/SQLAlchemy connection (see #SQLite).</span>
2732
-
<DF> = pd.read_clipboard() <spanclass="hljs-comment"># Reads a copied table from the clipboard.</span>
2733
2732
</code></pre>
2734
2733
<pre><codeclass="python language-python hljs"><dict> = <DF>.to_dict([<spanclass="hljs-string">'d/l/s/…'</span>]) <spanclass="hljs-comment"># Returns columns as dicts, lists or series.</span>
2735
2734
<str> = <DF>.to_json/html/csv([<path>]) <spanclass="hljs-comment"># Also to_markdown/latex([<path>]).</span>
<pre><codeclass="python language-python hljs"><GB> = <DF>.groupby(column_key/s) <spanclass="hljs-comment"># Splits DF into groups based on passed column.</span>
2748
2747
<DF> = <GB>.apply(<func>) <spanclass="hljs-comment"># Maps each group. Func can return DF, Sr or el.</span>
2749
2748
<GB> = <GB>[column_key] <spanclass="hljs-comment"># Single column GB. All operations return a Sr.</span>
2749
+
<Sr> = <GB>.size() <spanclass="hljs-comment"># A Sr of group sizes. Keys are group "names".</span>
0 commit comments