pandas NotImplementedError: data_source='iex' 未实现

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/49936387/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 05:29:44  来源:igfitidea点击:

NotImplementedError: data_source='iex' is not implemented

pandaspandas-datareaderiex

提问by Oscar Bomboscar

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.

我正在尝试通过 jupyter notebook 中的 pandas_datareader 获取一些股票数据。我正在使用谷歌,但这不再有效,所以我使用 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?

任何人都可以帮我解决这个问题吗?

回答by Harvey

Many DataReader sources are deprecated, see updated list here.

许多 DataReader 源已弃用,请参阅此处的更新列表。

Many now require API key, IEX is one of them:

现在很多都需要 API 密钥,IEX 就是其中之一:

Usage of all IEX readers now requires an API key.

所有 IEX 阅读器的使用现在都需要一个API 密钥

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:

IEX Cloud Console获取 API 密钥,该密钥可以存储在 IEX_API_KEY 环境变量中。只需在 Jupyter Notebook 中执行这个单独的单元格:

os.environ["IEX_API_KEY"] = "pk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

os.environ["IEX_API_KEY"] = "pk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

With free IEX accountyou can get 500,000 free Core messages/mo.

使用免费的 IEX 帐户,您可以获得 500,000 条免费的 Core 消息/月。

回答by RocqJones

data.DataReader using 'iex' might have been discontinued. Use 'yahoo'.

使用 'iex' 的 data.DataReader 可能已停止使用。使用“雅虎”。

回答by Pengfei Chen

You need to update the module. Go to terminal and type:

您需要更新模块。转到终端并输入:

conda install pandas-datareader

回答by hanumanDev

this should resolve it: pip install git+https://github.com/pydata/pandas-datareader.git

这应该解决它: pip install git+https://github.com/pydata/pandas-datareader.git