I am new to python(and github) but Here is my code:
import datetime as dt
import matplotlib.pyplot as plt
from matplotlib import style
import pandas as pd
import pandas_datareader.data as web
style.use('ggplot')
start= dt.datetime(2013,1,1)
end= dt.datetime (2017,12,31)
df= web.Datareader('TSLA', 'yahoo', start,end)
print(df.tail(6))
This was fixed in #520 and will be a part of the next release (0.7.0). For now, I would recommend using the dev version (master branch of this repo - pip install git+https://github.com/pydata/pandas-datareader)
Could you tell me in detail? I input the"pip install git+https://github.com/pydata/pandas-datareader"in CMD,but "Cloning https://github.com/pydata/pandas-datareader to c:users文杰appdatalocaltemppip-req-build-a4j1fei8
Error [WinError 2] 系统找不到指定的文件。 while executing command git clone -q https://github.com/pydata/pandas-datareader C:Users文杰AppDataLocalTemppip-req-build-a4j1fei8
Cannot find command 'git' - do you have 'git' installed and in your PATH?" was appear. I am a new learner about python,so ,thanks for your help.
It was helpful Th U!!!
Thank you, but sadly it still does not work for me :( Any other suggestions?
You can use yahoo finance API instead. You'll need to get it first by pip install fix-yahoo-finance.
ex.py:
`#imports
import pandas as pd
pd.core.common.is_list_like = pd.api.types.is_list_like
from pandas_datareader import data, wb
import fix_yahoo_finance as yf
yf.pdr_override()
import numpy as np
import datetime
start = datetime.datetime(2006, 1, 1)
end = datetime.datetime(2016, 1, 1)
df = data.get_data_yahoo('MS', start, end)
thanks @744351361
a workaround for this problem is to downgrade pandas to version 0.20.3
Thank you rishabh-vij, it works.
Most helpful comment
This was fixed in #520 and will be a part of the next release (0.7.0). For now, I would recommend using the dev version (master branch of this repo -
pip install git+https://github.com/pydata/pandas-datareader)