From 0640e70c35223e93c6092a7aec406c7e712f1996 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= <sornjure@gmail.com> Date: Sun, 30 Mar 2025 20:19:16 +0200 Subject: [PATCH] Datetime, Pandas --- README.md | 4 ++-- index.html | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 7fed961..6cdf782 100644 --- a/README.md +++ b/README.md @@ -632,7 +632,7 @@ import zoneinfo, dateutil.tz ### Encode ```python <D/T/DT> = D/T/DT.fromisoformat(<str>) # Object from ISO string. Raises ValueError. -<DT> = DT.strptime(<str>, '<format>') # Datetime from str, according to format. +<DT> = DT.strptime(<str>, '<format>') # Datetime from custom string. See Format. <D/DTn> = D/DT.fromordinal(<int>) # D/DT from days since the Gregorian NYE 1. <DTn> = DT.fromtimestamp(<float>) # Local naive DT from seconds since the Epoch. <DTa> = DT.fromtimestamp(<float>, <tz>) # Aware datetime from seconds since the Epoch. @@ -3349,7 +3349,7 @@ c 6 7 <DF> = pd.read_csv/excel(<path/url/file>) # Also `header/index_col/dtype/usecols/…=<obj>`. <list> = pd.read_html(<path/url/file>) # Raises ImportError if webpage has zero tables. <S/DF> = pd.read_parquet/feather/hdf(<path…>) # Function read_hdf() accepts `key=<s/df_name>`. -<DF> = pd.read_sql('<table/query>', <conn>) # Pass SQLite3/Alchemy connection (see #SQLite). +<DF> = pd.read_sql('<table/query>', <conn>) # Pass SQLite3/Alchemy connection. See #SQLite. ``` ```python diff --git a/index.html b/index.html index 6fa12a2..a3ca5c8 100644 --- a/index.html +++ b/index.html @@ -56,7 +56,7 @@ <body> <header> - <aside>March 29, 2025</aside> + <aside>March 30, 2025</aside> <a href="https://gto76.github.io" rel="author">Jure Šorn</a> </header> @@ -562,7 +562,7 @@ shuffle(<list>) <span class="hljs-commen <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> </ul> <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> -<DT> = DT.strptime(<str>, <span class="hljs-string">'<format>'</span>) <span class="hljs-comment"># Datetime from str, according to format.</span> +<DT> = DT.strptime(<str>, <span class="hljs-string">'<format>'</span>) <span class="hljs-comment"># Datetime from custom string. See Format.</span> <D/DTn> = D/DT.fromordinal(<int>) <span class="hljs-comment"># D/DT from days since the Gregorian NYE 1.</span> <DTn> = DT.fromtimestamp(<float>) <span class="hljs-comment"># Local naive DT from seconds since the Epoch.</span> <DTa> = DT.fromtimestamp(<float>, <tz>) <span class="hljs-comment"># Aware datetime from seconds since the Epoch.</span> @@ -2744,7 +2744,7 @@ c <span class="hljs-number">6</span> <span class="hljs-number">7</span> <DF> = pd.read_csv/excel(<path/url/file>) <span class="hljs-comment"># Also `header/index_col/dtype/usecols/…=<obj>`.</span> <list> = pd.read_html(<path/url/file>) <span class="hljs-comment"># Raises ImportError if webpage has zero tables.</span> <S/DF> = pd.read_parquet/feather/hdf(<path…>) <span class="hljs-comment"># Function read_hdf() accepts `key=<s/df_name>`.</span> -<DF> = pd.read_sql(<span class="hljs-string">'<table/query>'</span>, <conn>) <span class="hljs-comment"># Pass SQLite3/Alchemy connection (see #SQLite).</span> +<DF> = pd.read_sql(<span class="hljs-string">'<table/query>'</span>, <conn>) <span class="hljs-comment"># Pass SQLite3/Alchemy connection. See #SQLite.</span> </code></pre></div> <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 @@ $ deactivate <span class="hljs-comment"># Deactivates the active <footer> - <aside>March 29, 2025</aside> + <aside>March 30, 2025</aside> <a href="https://gto76.github.io" rel="author">Jure Šorn</a> </footer>