我对以下问题感到非常困惑。我根本不了解我的计算机如何工作。
我有以下代码:
import pandas as pd
import numpy as np
from pandas_datareader import data as wd
import quandl
tickers = ['MSFT','AAPL','F','GE']
new_data_01 = pd.DataFrame()
for ii in tickers:
new_data_01[ii] = wd.DataReader(ii, data_source = 'yahoo', start ='2001-1-1')['Adj Close']
new_data_01.head()
当我同时在Spyder和Anaconda笔记本电脑上运行该软件时,效果很好。但是,当我在IDLE中运行它时,情况并非如此。我不明白为什么。这是我在IDLE中运行代码时遇到的错误...
Traceback (most recent call last):
File "/Users/andres/Desktop/test.py", line 9, in <module>
new_data_01[ii] = wd.DataReader(ii, data_source = 'yahoo', start ='2001-1-1')['Adj Close']
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pandas_datareader/data.py", line 291, in DataReader
raise ImmediateDeprecationError(DEP_ERROR_MSG.format('Yahoo Daily'))
pandas_datareader.exceptions.ImmediateDeprecationError:
Yahoo Daily 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.
See https://github.com/pydata/pandas-datareader/issues
慕娘9325324
相关分类