I am trying to download financial data using the library pandas_datareader Here is a code that I'm trying to run:
from pandas_datareader import data
import fix_yahoo_finance as yf
yf.pdr_override()
symbol = 'AMZN'
data_source='google'
start_date = '2010-01-01'
end_date = '2016-01-01'
df = data.get_data_yahoo(symbol, start_date, end_date)
print(df)
df.head()
The error message I got is "Import "pandas_datareader" could not be resolved" and "Import "fix_yahoo_finance" could not be resolved".
I made sure that pandas_datareader is installed and up to date using pip install, but I'm not sure if I installed it to the correct environment.
I'm relatively new to the topic, so any advice or troubleshooting step would be much appreciated!
After searching a bit, I found following:
yfinance
which you can install with:pip install yfinance --upgrade --no-cache-dir
pandas_datareader
with:pip install pandas-datareader
distutils
error which can be solved with:pip install setuptools
yf.pdr_override()
is removed already and you will get an error.