Both date formats below (string or datetime) used to work. However, in the last few days these lines only output the last year's worth of data, regardless the year I specify (here 2012):
import pandas_datareader.data as wb
import datetime
start = datetime.datetime(2012,1,1)
end = datetime.datetime(2012,12,31)
df = wb.DataReader ('GE', 'google', '2012, 1, 1', '2012, 12, 31') # doesn't work
print (df)
df2 = wb.DataReader ('GE', 'google', start, end) # doesn't work
print (df2)
abbreviated output for both:
Open High Low Close Volume
Date
2016-09-15 29.55 29.85 29.42 29.75 35262527
...
2017-09-13 23.93 24.18 23.92 24.11 38629676
during the process of fixing this, i upgraded to the most current version of pandas (0.20.3) and pandas-datareader (0.5.0). that did not fix the code in the question. the problem appears to be trying to use google as the source. the code below runs correctly but uses yahoo as the source. however, it fails when trying to use google as the source.