6

使用 pip install googlefinance.client 安装软件包后,我正在尝试运行 googlefinance.client 1.3.0 文档中的示例代码

from googlefinance.client import get_price_data, get_prices_data, get_prices_time_data
# Dow Jones param = {
    'q': ".DJI", # Stock symbol (ex: "AAPL")
    'i': "86400", # Interval size in seconds ("86400" = 1 day intervals)
    'x': "INDEXDJX", # Stock exchange symbol on which stock is traded (ex: "NASD")
    'p': "1Y" # Period (Ex: "1Y" = 1 year) }
# get price data (return pandas dataframe) df = get_price_data(param) print(df)

但是,我没有得到价格数据集,而是得到了一个空数据框

Empty DataFrame
Columns: [Open, High, Low, Close, Volume]
Index: []

我怎样才能解决这个问题?谢谢!

4

0 回答 0