Skip to content

Commit 866fc84

Browse files
committed
Pandas
1 parent c074e81 commit 866fc84

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3201,7 +3201,7 @@ c 6 7
32013201

32023202
```text
32033203
+------------------------+---------------+------------+------------+--------------------------+
3204-
| | 'outer' | 'inner' | 'left' | description |
3204+
| | 'outer' | 'inner' | 'left' | Description |
32053205
+------------------------+---------------+------------+------------+--------------------------+
32063206
| l.merge(r, on='y', | x y z | x y z | x y z | Joins/merges on column. |
32073207
| how=…) | 0 1 2 . | 3 4 5 | 1 2 . | Also accepts left_on and |
@@ -3389,8 +3389,8 @@ def main():
33893389
def scrape_data():
33903390
def scrape_yahoo(id_):
33913391
BASE_URL = 'https://query1.finance.yahoo.com/v7/finance/download/'
3392-
now = int(datetime.datetime.now().timestamp())
3393-
url = f'{BASE_URL}{id_}?period1=1579651200&period2={now}&interval=1d&events=history'
3392+
now = int(datetime.datetime.now().timestamp())
3393+
url = f'{BASE_URL}{id_}?period1=1579651200&period2={now}&interval=1d&events=history'
33943394
return pd.read_csv(url, usecols=['Date', 'Close']).set_index('Date').Close
33953395
covid = pd.read_csv('https://covid.ourworldindata.org/data/owid-covid-data.csv',
33963396
usecols=['date', 'total_cases'])

index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2721,7 +2721,7 @@
27212721
</code></pre></div>
27222722

27232723
<pre><code class="python hljs">┏━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━┓
2724-
┃ │ <span class="hljs-string">'outer'</span><span class="hljs-string">'inner'</span><span class="hljs-string">'left'</span>description
2724+
┃ │ <span class="hljs-string">'outer'</span><span class="hljs-string">'inner'</span><span class="hljs-string">'left'</span>Description
27252725
┠────────────────────────┼───────────────┼────────────┼────────────┼──────────────────────────┨
27262726
┃ l.merge(r, on=<span class="hljs-string">'y'</span>, │ x y z │ x y z │ x y z │ Joins/merges on column. ┃
27272727
┃ how=…) │ <span class="hljs-number">0</span> <span class="hljs-number">1</span> <span class="hljs-number">2</span> . │ <span class="hljs-number">3</span> <span class="hljs-number">4</span> <span class="hljs-number">5</span><span class="hljs-number">1</span> <span class="hljs-number">2</span> . │ Also accepts left_on and ┃
@@ -2873,8 +2873,8 @@
28732873
<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">scrape_data</span><span class="hljs-params">()</span>:</span>
28742874
<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">scrape_yahoo</span><span class="hljs-params">(id_)</span>:</span>
28752875
BASE_URL = <span class="hljs-string">'https://query1.finance.yahoo.com/v7/finance/download/'</span>
2876-
now = int(datetime.datetime.now().timestamp())
2877-
url = <span class="hljs-string">f'<span class="hljs-subst">{BASE_URL}</span><span class="hljs-subst">{id_}</span>?period1=1579651200&amp;period2=<span class="hljs-subst">{now}</span>&amp;interval=1d&amp;events=history'</span>
2876+
now = int(datetime.datetime.now().timestamp())
2877+
url = <span class="hljs-string">f'<span class="hljs-subst">{BASE_URL}</span><span class="hljs-subst">{id_}</span>?period1=1579651200&amp;period2=<span class="hljs-subst">{now}</span>&amp;interval=1d&amp;events=history'</span>
28782878
<span class="hljs-keyword">return</span> pd.read_csv(url, usecols=[<span class="hljs-string">'Date'</span>, <span class="hljs-string">'Close'</span>]).set_index(<span class="hljs-string">'Date'</span>).Close
28792879
covid = pd.read_csv(<span class="hljs-string">'https://covid.ourworldindata.org/data/owid-covid-data.csv'</span>,
28802880
usecols=[<span class="hljs-string">'date'</span>, <span class="hljs-string">'total_cases'</span>])

parse.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ const DIAGRAM_15_A =
302302

303303
const DIAGRAM_15_B =
304304
"┏━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━┓\n" +
305-
"┃ │ 'outer' │ 'inner' │ 'left' │ description ┃\n" +
305+
"┃ │ 'outer' │ 'inner' │ 'left' │ Description ┃\n" +
306306
"┠────────────────────────┼───────────────┼────────────┼────────────┼──────────────────────────┨\n" +
307307
"┃ l.merge(r, on='y', │ x y z │ x y z │ x y z │ Joins/merges on column. ┃\n" +
308308
"┃ how=…) │ 0 1 2 . │ 3 4 5 │ 1 2 . │ Also accepts left_on and ┃\n" +

0 commit comments

Comments
 (0)