Skip to content

Commit 1c04305

Browse files
authored
change ticker_list (#252)
1 parent 6b508e1 commit 1c04305

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed
-571 Bytes
Loading

lectures/pandas.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -673,11 +673,10 @@ ticker_list = {'INTC': 'Intel',
673673
'TM': 'Toyota',
674674
'AAPL': 'Apple',
675675
'AMZN': 'Amazon',
676-
'BA': 'Boeing',
676+
'C': 'Citigroup',
677677
'QCOM': 'Qualcomm',
678678
'KO': 'Coca-Cola',
679-
'GOOG': 'Google',
680-
'PTR': 'PetroChina'}
679+
'GOOG': 'Google'}
681680
```
682681

683682
Here's the first part of the program
@@ -695,6 +694,9 @@ def read_data(ticker_list,
695694
for tick in ticker_list:
696695
stock = yf.Ticker(tick)
697696
prices = stock.history(start=start, end=end)
697+
698+
# Change the index to date-only
699+
prices.index = pd.to_datetime(prices.index.date)
698700
699701
closing_prices = prices['Close']
700702
ticker[tick] = closing_prices

0 commit comments

Comments
 (0)