pepew
pepew

Reputation: 43

ImportError: No module named 'pandas.testing'

Thank you in advance. I have pandas-datareader==0.7.0+7.g7949e60 succesfull installed, but when i run the scripts, appears this:

     Traceback (most recent call last):
  File "/home/pepew/sss/screener/cargadordatos.py", line 14, in <module>
    from pandas_datareader import data as pdr
  File "/home/pepew/.virtualenvs/myproject/lib/python3.5/site-packages/pandas_datareader/__init__.py", line 2, in <module>
    from .data import (DataReader, Options, get_components_yahoo,
  File "/home/pepew/.virtualenvs/myproject/lib/python3.5/site-packages/pandas_datareader/data.py", line 7, in <module>
    from pandas_datareader.av.forex import AVForexReader
  File "/home/pepew/.virtualenvs/myproject/lib/python3.5/site-packages/pandas_datareader/av/__init__.py", line 3, in <module>
    from pandas_datareader.base import _BaseReader
  File "/home/pepew/.virtualenvs/myproject/lib/python3.5/site-packages/pandas_datareader/base.py", line 13, in <module>
    from pandas_datareader._utils import (RemoteDataError, SymbolWarning,
  File "/home/pepew/.virtualenvs/myproject/lib/python3.5/site-packages/pandas_datareader/_utils.py", line 5, in <module>
    from pandas_datareader.compat import is_number
  File "/home/pepew/.virtualenvs/myproject/lib/python3.5/site-packages/pandas_datareader/compat/__init__.py", line 24, in <module>
    from pandas.testing import assert_frame_equal
     ImportError: No module named 'pandas.testing'
>>>

Upvotes: 0

Views: 5640

Answers (2)

Addison Lynch
Addison Lynch

Reputation: 685

Pandas Datareader requires pandas version 0.19.2 or higher. This error is likely due to the fact that your pandas version is before 0.19.2. If this is the case, the best way to update pandas is:

pip install pandas -U

Upvotes: 1

Swier
Swier

Reputation: 4196

Pandas-datareader appears to require pandas version 0.19.2+. But the pandas.testing module was only added in 0.20.1

A workaround would be to upgrade the pandas package: pip install pandas -U

Upvotes: 2

Related Questions