我正在学习和使用熊猫和蟒蛇.
今天,我正在尝试制作一个fx费率表,但我在获得"USDJPY"的价格方面遇到了麻烦.
当我得到'EUR/USD'的价格时,我的代码是这样的.
eur = web.DataReader('EURUSD=X','yahoo')['Adj Close']
Run Code Online (Sandbox Code Playgroud)
有用.
但是当我写作时
jpy = web.DataReader('USDJPY=X','yahoo')['Adj Close']
Run Code Online (Sandbox Code Playgroud)
错误消息是这样的:
-------------------------------------------------- ------------------------- IOError Traceback(最近一次调用last)in()----> 1 jpy = web.DataReader('USDJPY = X','yahoo')['Adj Close']
DataReader中的C:\ Anaconda\lib\site-packages\pandas\io\data.pyc(name,data_source,start,end,retry_count,pause)70返回get_data_yahoo(symbols = name,start = start,end = end,71 adjust_price = False,chunksize = 25,---> 72 retry_count = retry_count,pause = pause)73 elif data_source =="google":74返回get_data_google(symbols = name,start = start,end = end,
get_data_yahoo中的C:\ Anaconda\lib\site-packages\pandas\io\data.pyc(符号,start,end,retry_count,pause,adjust_price,ret_index,chunksize,name)388"""389 return _get_data_from(symbols,start ,结束,retry_count,暂停, - > 390 adjust_price,ret_index,chunksize,'yahoo',name)391 392
_get_data_from中的C:\ Anaconda\lib\site-packages\pandas\io\data.pyc(符号,开始,结束,重试_计数,暂停,调整_价格,ret_index,chunksize,来源,名称)334#如果是单个符号,(例如,'GOOG')335 if isinstance(symbols,(basestring,int)): - > 336 hist_data = src_fn(symbols,start,end,retry_count,pause)337#或多个符号,(例如,['GOOG', 'AAPL','MSFT'])338 elif isinstance(symbols,DataFrame):
_get_hist_yahoo中的C:\ Anaconda\lib\site-packages\pandas\io\data.pyc(sym,start,end,retry_count,pause)188'&g = d'+ …