yfinance上的迭代下载

时间:2019-12-28 08:27:16

标签: python-3.x pandas dictionary

import time
import yfinance as yf
from pandas_datareader import data as pdr

yf.pdr_override() # <== that's all it takes :-)

data = pdr.get_data_yahoo("AAPL", start="2019-12-01", end="2019-12-29")
print(data)

                  Open        High         Low       Close   Adj Close    Volume
Date
2019-12-02  267.269989  268.250000  263.450012  264.160004  264.160004  23621800
2019-12-03  258.309998  259.529999  256.290009  259.450012  259.450012  28607600
`

我只需要保存日期,然后在表中保存为两个col。如何通过迭代仅获取这两个值。谢谢!

0 个答案:

没有答案