Morningstar 数据导入不会提供请求的所有日期价格

Morningstar data import wont give all dates prices requested

yahoo 和 google 倒下后,我找到一个建议从 morningstar 下载数据的人,但它只会给我最多 5 天的价格。我试过不同的日期,但没有办法让它工作。

我正在使用 python 3.6.5 和 PyCharm。

import datetime
import pandas_datareader.data as web

start = datetime.datetime(2016, 1, 1)
end = datetime.datetime(2016, 1, 10)
df = web.DataReader("AAPL", 'morningstar', start, end)
df.reset_index(inplace=True)
df.set_index("Date", inplace=True)
df = df.drop("Symbol", axis=1)

print(df.head())

我是 python 的新手,一般来说是编码,所以如果有什么我可以更具体的,请告诉我。

谢谢

只需将 .head() 放入

print(df.head())

因为这意味着产生前 5 行。

https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.head.html