Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example broken in pandas 0.24.1 #3

Open
robmarkcole opened this issue Feb 5, 2019 · 0 comments
Open

Example broken in pandas 0.24.1 #3

robmarkcole opened this issue Feb 5, 2019 · 0 comments

Comments

@robmarkcole
Copy link

robmarkcole commented Feb 5, 2019

Hi
the readme example fails with:

ImportError                               Traceback (most recent call last)
<ipython-input-2-51d2dd43773f> in <module>()
      1 #from pandas.api.types import is_list_like
----> 2 from pandas_datareader import data
      3 
      4 df = data.get_data_yahoo("SPY")
      5 df['return'] = df['Adj Close'].pct_change().fillna(0)

~/anaconda3/lib/python3.6/site-packages/pandas_datareader/__init__.py in <module>()
      1 from ._version import get_versions
----> 2 from .data import (DataReader, Options, get_components_yahoo,
      3                    get_dailysummary_iex, get_data_enigma, get_data_famafrench,
      4                    get_data_fred, get_data_google, get_data_moex,
      5                    get_data_morningstar, get_data_quandl, get_data_stooq,

~/anaconda3/lib/python3.6/site-packages/pandas_datareader/data.py in <module>()
     12     ImmediateDeprecationError
     13 from pandas_datareader.famafrench import FamaFrenchReader
---> 14 from pandas_datareader.fred import FredReader
     15 from pandas_datareader.google.daily import GoogleDailyReader
     16 from pandas_datareader.google.options import Options as GoogleOptions

~/anaconda3/lib/python3.6/site-packages/pandas_datareader/fred.py in <module>()
----> 1 from pandas.core.common import is_list_like
      2 from pandas import concat, read_csv
      3 
      4 from pandas_datareader.base import _BaseReader
      5 

ImportError: cannot import name 'is_list_like'

The solution is to use

import pandas as pd
pd.core.common.is_list_like = pd.api.types.is_list_like

However we then run into:

ImmediateDeprecationError                 Traceback (most recent call last)
<ipython-input-3-3d15747a3d26> in <module>()
      2 from pandas_datareader import data
      3 
----> 4 df = data.get_data_yahoo("SPY")
      5 df['return'] = df['Adj Close'].pct_change().fillna(0)

~/anaconda3/lib/python3.6/site-packages/pandas_datareader/data.py in get_data_yahoo(*args, **kwargs)
     61 
     62 def get_data_yahoo(*args, **kwargs):
---> 63     raise ImmediateDeprecationError(DEP_ERROR_MSG.format('Yahoo Actions'))
     64     return YahooDailyReader(*args, **kwargs).read()
     65 

ImmediateDeprecationError: 
Yahoo Actions has been immediately deprecated due to large breaks in the API without the
introduction of a stable replacement. Pull Requests to re-enable these data
connectors are welcome.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant