使用 Enthought Canopy 修复来自雅虎财经的 pandas 数据阅读器 [英] Fixing panda's datareader from yahoo finance with Enthought Canopy
问题描述
来自 yahoo Finance 的 pandas 数据读取器目前无法工作,因为 yahoo 更改了用于获取数据的 url pandas,yahoo 将其从 'http://ichart.yahoo.com/table.csv?...
到 'http://ichart.finance.yahoo.com/table.csv?...
.
pandas' datareader from yahoo finance is not working at the moment because yahoo changed the url pandas used to get the data from, yahoo changed it from 'http://ichart.yahoo.com/table.csv?...
to 'http://ichart.finance.yahoo.com/table.csv?...
.
我得到的错误是IOError:经过 3 次尝试,Yahoo!没有为 url '...' 返回 200
因此,我尝试根据 此修复程序,但还是不行.我正在使用带有 Enthought Canopy 的 pandas 0.12.我需要编译一些东西吗..?还有什么要求吗?
So, I tried editing data.py, according to this fix, but still no go. I'm using pandas 0.12, with Enthought Canopy. Do I need to compile something..? is there anything more required?
推荐答案
in(假设用户使用的是 Enthought Canopy for Windows,并且它存储在默认位置):
in (assuming that the user is using Enthought Canopy for Windows, and it's stored in the default location):
C:\Users\...\AppData\Local\Enthought\Canopy\System\Lib\site-packages\pandas\io
更改yahoo_URL = 'http://ichart.yahoo.com/table.csv?'
到 yahoo_URL = 'http://ichart.finance.yahoo.com/table.csv?'
保存并重启 Canopy
Save and restart Canopy
这篇关于使用 Enthought Canopy 修复来自雅虎财经的 pandas 数据阅读器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!