Pandas_datareader金融数据程序包下载出现的各种后续问题

在尝试使用Pandas_datareader获取Google股票价格数据时遇到报错,问题根源在于Yahoo Finance数据源的库已更名。通过安装并使用yfinance库解决了这个问题。参考了两篇优快云博客文章成功完成数据导入。

由于要分析Google的历史股票价格数据进行可视化,导入了Pandas_datareader程序包

pip install pandas_datareader

导入数据:

from pandas_datareader import data
goog=data.DataReader('GOOG',start='2004',end='2016',data_source='google')
print(goog.head())

报错,出现以下问题:

Traceback (most recent call last):
  File "E:/python数据/goole-finance.py", line 2, in <module>
    goog=data.DataReader('GOOG',start='2004',end='2016',data_source='google')
  File "D:\python3.6.5\lib\site-packages\pandas_datareader\data.py", line 316, in DataReader
    session=session).read()
  File "D:\python3.6.5\lib\site-packages\pandas_datareader\google\daily.py", line 36, in __init__
    raise ImmediateDeprecationError(DEP_ERROR_MSG.format('Google finance'))
pandas_datareader.exceptions.ImmediateDeprecationError: 
Google finance has been immediately deprecated due to large breaks in the API without the
introduction of a stable replacement. Pull Requests to re-enable the
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值