pandas_datareader问题

时间:2018-05-19 23:21:45

标签: python pandas

我是python世界的新手,正致力于使用pandas_datareader获取数据但面临下面的问题。

import numpy as np
import datetime
import pandas as pd
import pandas_datareader as web
start = datetime.datetime(2017, 1, 1)
end = datetime.datetime(2017, 12, 31)
AAPL = web.get_data_yahoo('AAPL', 'yahoo', start, end)

追踪(最近一次呼叫最后一次):

File "<stdin>", line 1, in <module>   File
"C:\Users\DELL\AppData\Local\Continuum\anaconda3\lib\site-packages\pandas_datareader\data.py",
line 63, in get_data_yahoo
    raise ImmediateDeprecationError(DEP_ERROR_MSG.format('Yahoo Actions')) pandas_datareader.exceptions.ImmediateDeprecationError:
Yahoo Actions has been immediately deprecated due to large breaks in
the API without the introduction of a stable replacement. Pull
Requests to re-enable these data connectors are welcome.

请参阅https://github.com/pydata/pandas-datareader/issues

1 个答案:

答案 0 :(得分:0)

雅虎去年关闭了他们的API,因此pandas_datareader折旧(停止使用)该功能。请尝试使用quandl