Skip to content

Commit 16ffaa3

Browse files
authored
fix pandas (#249)
1 parent 4e65f9c commit 16ffaa3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lectures/pandas.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,10 @@ def read_data(ticker_list,
695695
for tick in ticker_list:
696696
stock = yf.Ticker(tick)
697697
prices = stock.history(start=start, end=end)
698+
699+
# Change the index to date
700+
prices.index = pd.to_datetime(prices.index.date)
701+
698702
closing_prices = prices['Close']
699703
ticker[tick] = closing_prices
700704

0 commit comments

Comments
 (0)