NotImplementedError: data_source='iex' is not implemented

余生长醉 提交于 2019-12-13 14:10:54

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!