I have problem exciting the simplest code in pandas datareader here is the code:
import datetime as dt
import pandas_datareader as web
symbol = "FB"
start = dt.datetime(2020,1,1)
end = dt.datetime(2022,1,1)
df = web.Datareader(symbol, "yahoo", start,end)
Error : TypeError : string indices must be integers
pandas_datareader no longer works for yahoo. Try yfinance :
import yfinance as yf
symbol = "META"
start = dt.datetime(2020,1,1)
end = dt.datetime(2022,1,1)
df = yf.download(symbol, start = start, end=end)