noobs on python here.
I am currently using python pandas-datareader 0.7 for some stock analysis.
With the update of pandas-datareader 0.8. It should be able to grab historical data from Alpha Vantage.
But I don't really understand how to use the api key (currently using yahoo and no key is needed)
From the documentation of pandas-datareader, I tried the same code (with my api key say ABC123 registered in alpha vantage) by replacing the ALPHAVANTAGE_API_KEY with ABC123
import os
from datetime import datetime
import pandas_datareader.data as web
df = web.DataReader("AAPL", "av-daily", start=datetime(2017, 2, 9),end=datetime(2017, 5, 24),api_key=os.getenv('ABC123'))
print(df)
I expected it outputs the historical data.
But it said "DataReader() got an unexpected keyword argument 'api_key'"
How do I correctly use the api key so that I can grab the data?