Reputation: 59
After yahoo and google fall, i found a guy who suggested downloading data from morningstar, but it will only give me as much as 5 days prices. I´ve tried with different dates but there is no way to make it work.
Im using python 3.6.5 and 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())
Im new to python and coding in general, so if there is anything I can be more specific about, just make me know.
Thanks
Upvotes: 1
Views: 272
Reputation: 5914
Just drop .head()
in
print(df.head())
because that's meant to yield the first 5 rows.
https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.head.html
Upvotes: 1