from pandas_datareader import data as web
import yfinance as yf
#import fix_yahoo_finance as yf 这个代码过时了,详情看https://pypi.org/project/fix-yahoo-finance/
yf.pdr_override()
本人的代码:from pandas_datareader import data as web
import yfinance as yf
#import fix_yahoo_finance as yf 这个代码过时了,详情看https://pypi.org/project/fix-yahoo-finance/
yf.pdr_override()
#不翻墙或者网速较慢可能无法从Yahoo读取,属于正常现象;
data = web.get_data_yahoo(‘GS’, start = ‘2010-01-01’, end = ‘2012-01-01’)
关于搜集YAHOO数据的Python代码
最新推荐文章于 2024-09-05 07:21:58 发布