We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4e65f9c commit 16ffaa3Copy full SHA for 16ffaa3
1 file changed
lectures/pandas.md
@@ -695,6 +695,10 @@ def read_data(ticker_list,
695
for tick in ticker_list:
696
stock = yf.Ticker(tick)
697
prices = stock.history(start=start, end=end)
698
+
699
+ # Change the index to date
700
+ prices.index = pd.to_datetime(prices.index.date)
701
702
closing_prices = prices['Close']
703
ticker[tick] = closing_prices
704
0 commit comments