最近在学习爬数据,这是对matplotlib.finance下的quotes_historical_yahoo模块的功能学习。该模块用于从雅虎财经查询有用的信息。
Help on function quotes_historical_yahoo inmodule matplotlib.finance:
查询调用格式如下,其中ticker指的是股票简称(如‘AXP’,‘SOHU’,‘XINA’等);date1指的是数据起始日期,date2指的是数据终止日期。返回数据时,顺序是从过去到现在,也就是最近的数据会在最下方。
quotes_historical_yahoo(ticker, date1,date2, asobject=False, adjusted=True, cachename=None)
Get historical data for ticker between date1 and date2.
看注释说这个模块好像已经被抛弃了……我看的学习资料有点老了吗……
之后可以调用quotes_yahoo_historical_ochl或quotes_yahoo_historical_ohlc来完成同样的需求。
This function has been deprecated in 1.4 in favor of
`quotes_yahoo_historical_ochl`, which maintains the original argument
order, or `quotes_yahoo_historical_ohlc`, which uses the
open-high-low-close order. Thisfunction will be removed in 1.5
See :func:`