Running the following:
import pandas as pd
import numpy as np
import matplotlib.pylab as plt
import datetime as dt
import pandas_datareader.data as web
start = dt.datetime(2015, 1, 1)
end = dt.datetime.now()
df = web.DataReader("TSLA", 'morningstar', start, end)
Error coming back is
NotImplementedError: data_source='morningstar' is not implemented
I have done uninstall and install of DataREader but same issue
NotImplementedError: data_source='morningstar' is not implemented
What version of pandas datareader are you using? You can check this if using pip via the command pip freeze or alternatively:
import pandas_datareader
print(pandas_datareader.__version__)
As of v0.7.0 Google finance and Morningstar have been immediately deprecated due to large changes in their API and no stable replacement.
I'm trying to do the same thing but just with Tesla.
start = data_source=datetime.datetime(2015, 1, 1, 0, 0)
end = datetime.datetime.now()
df = web.DataReader("TSLA", start, end)
df.reset_index(inplace=True)
df.set_index("Date", inplace=True)
df = df.drop("Symbol", axis=1)
print(df.head())
I have datareader version:
0.7.0+7.g7949e60 I pulled it for this
pip install git+https://github.com/pydata/pandas-data
reader.git
sir
change 'morningstar' or 'google' to 'yahoo'
it will work
google was deprecated. Try using 'yahoo', it works perfectly.
start = dt.datetime(2015, 1, 1, 0, 0)
end = dt.datetime.now()
df = web.DataReader("TSLA", 'yahoo', start, end)
Symbol = 'High'
df.reset_index(inplace=True)
df.set_index("Date", inplace=True)
df = df.drop('High',axis='columns')
df.head(7)
聽 | Low | Open | Close | Volume
-- | -- | -- | -- | --
222.250000 | 223.089996 | 222.410004 | 2297500
213.259995 | 222.869995 | 219.309998 | 4764400
207.160004 | 214.550003 | 210.089996 | 5368500
204.210007 | 210.059998 | 211.279999 | 6261900
209.779999 | 213.350006 | 210.949997 | 2968400
210.009995 | 212.809998 | 210.619995 | 3442500
204.960007 | 208.919998 | 206.660004 | 4668300
This really helped !
Most helpful comment
sir
change 'morningstar' or 'google' to 'yahoo'
it will work