Error from pandas.io.data import DataReader

ryanshuell at gmail.com ryanshuell at gmail.com
Thu Oct 2 03:50:37 CEST 2014


I am trying to run this snippet of code.


from pandas.io.data import DataReader
from pandas import Panel, DataFrame
import datetime

start = datetime.datetime(2010, 1, 1)
end = datetime.datetime(2013, 1, 27)

with open('dow.txt') as f:
    symbols = f.read().splitlines()  # ['AAPL', 'GLD', 'SPX', 'MCD']
    
data = dict((symbol, DataReader(symbol, "yahoo", start, end, pause=1)) for symbol in symbols)
panel = Panel(data).swapaxes('items', 'minor')
closing = panel['Close'].dropna()
closing.head()



I keep getting this error.
Traceback (most recent call last):
  File "C:\Python27\download_dow.py", line 1, in <module>
    from pandas.io.data import DataReader
ImportError: No module named pandas.io.data



More information about the Python-list mailing list