问题
I am trying to get some stock data through pandas_datareader in jupyter notebook. I was using google, but that does not work anymore, so I am using iex.
import pandas_datareader.data as web
import datetime
start = datetime.datetime(2015,1,1)
end = datetime.datetime(2017,1,1)
facebook = web.DataReader('FB','iex',start,end)
However, it comes back with the following error.
NotImplementedError: data_source='iex' is not implemented
Can anyone help me how to solve this issue please?
回答1:
You need to update the module. Go to terminal and type:
conda install pandas-datareader
回答2:
this should resolve it: pip install git+https://github.com/pydata/pandas-datareader.git
回答3:
Many DataReader sources are deprecated, see updated list here.
Many now require API key, IEX is one of them:
Usage of all IEX readers now requires an API key.
Get API key from IEX Cloud Console, which can be stored in the IEX_API_KEY environment variable. Just execute this is separate cell in Jupyter Notebook:
os.environ["IEX_API_KEY"] = "pk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
With free IEX account you can get 500,000 free Core messages/mo.
来源:https://stackoverflow.com/questions/49936387/notimplementederror-data-source-iex-is-not-implemented