|
56 | 56 |
|
57 | 57 | <body> |
58 | 58 | <header> |
59 | | - <aside>March 29, 2025</aside> |
| 59 | + <aside>March 30, 2025</aside> |
60 | 60 | <a href="https://gto76.github.io" rel="author">Jure Šorn</a> |
61 | 61 | </header> |
62 | 62 |
|
|
562 | 562 | <li><strong>To get ZoneInfo() to work on Windows run <code class="python hljs"><span class="hljs-string">'> pip3 install tzdata'</span></code>.</strong></li> |
563 | 563 | </ul> |
564 | 564 | <div><h3 id="encode">Encode</h3><pre><code class="python language-python apache hljs"><D/T/DT> = D/T/DT.fromisoformat(<str>) <span class="hljs-comment"># Object from ISO string. Raises ValueError.</span> |
565 | | -<DT> = DT.strptime(<str>, <span class="hljs-string">'<format>'</span>) <span class="hljs-comment"># Datetime from str, according to format.</span> |
| 565 | +<DT> = DT.strptime(<str>, <span class="hljs-string">'<format>'</span>) <span class="hljs-comment"># Datetime from custom string. See Format.</span> |
566 | 566 | <D/DTn> = D/DT.fromordinal(<int>) <span class="hljs-comment"># D/DT from days since the Gregorian NYE 1.</span> |
567 | 567 | <DTn> = DT.fromtimestamp(<float>) <span class="hljs-comment"># Local naive DT from seconds since the Epoch.</span> |
568 | 568 | <DTa> = DT.fromtimestamp(<float>, <tz>) <span class="hljs-comment"># Aware datetime from seconds since the Epoch.</span> |
@@ -2744,7 +2744,7 @@ <h3 id="format-2">Format</h3><div><h4 id="forstandardtypesizesandmanualalignment |
2744 | 2744 | <DF> = pd.read_csv/excel(<path/url/file>) <span class="hljs-comment"># Also `header/index_col/dtype/usecols/…=<obj>`.</span> |
2745 | 2745 | <list> = pd.read_html(<path/url/file>) <span class="hljs-comment"># Raises ImportError if webpage has zero tables.</span> |
2746 | 2746 | <S/DF> = pd.read_parquet/feather/hdf(<path…>) <span class="hljs-comment"># Function read_hdf() accepts `key=<s/df_name>`.</span> |
2747 | | -<DF> = pd.read_sql(<span class="hljs-string">'<table/query>'</span>, <conn>) <span class="hljs-comment"># Pass SQLite3/Alchemy connection (see #SQLite).</span> |
| 2747 | +<DF> = pd.read_sql(<span class="hljs-string">'<table/query>'</span>, <conn>) <span class="hljs-comment"># Pass SQLite3/Alchemy connection. See #SQLite.</span> |
2748 | 2748 | </code></pre></div> |
2749 | 2749 |
|
2750 | 2750 | <pre><code class="python language-python hljs"><DF>.to_json/csv/html/parquet/latex(<path>) <span class="hljs-comment"># Returns a string/bytes if path is omitted.</span> |
@@ -2944,7 +2944,7 @@ <h3 id="format-2">Format</h3><div><h4 id="forstandardtypesizesandmanualalignment |
2944 | 2944 |
|
2945 | 2945 |
|
2946 | 2946 | <footer> |
2947 | | - <aside>March 29, 2025</aside> |
| 2947 | + <aside>March 30, 2025</aside> |
2948 | 2948 | <a href="https://gto76.github.io" rel="author">Jure Šorn</a> |
2949 | 2949 | </footer> |
2950 | 2950 |
|
|
0 commit comments