pmorissette / ffn

ffn - a financial function library for Python
pmorissette.github.io/ffn
MIT License
1.94k stars 291 forks source link

compatibility with pandas 1.0.3? #98

Closed jainraje closed 3 years ago

jainraje commented 4 years ago

I had a need to upgrade my pandas to 1.0.3 and observed this breaks ffn (and bt).

Here is the error log: 15 import ffn 16 17 get_ipython().run_line_magic('matplotlib', 'inline ')

~/.virtualenvs/py3-dev/lib/python3.7/site-packages/ffn/init.py in 1 from . import core ----> 2 from . import data 3 4 from .data import get 5 #from .core import year_frac, PerformanceStats, GroupStats, merge

~/.virtualenvs/py3-dev/lib/python3.7/site-packages/ffn/data.py in 12 pd.core.common.is_list_like = pd.api.types.is_list_like 13 ---> 14 from pandas_datareader import data as pdata 15 16

~/.virtualenvs/py3-dev/lib/python3.7/site-packages/pandas_datareader/init.py in 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,

~/.virtualenvs/py3-dev/lib/python3.7/site-packages/pandas_datareader/data.py in 5 import warnings 6 ----> 7 from pandas_datareader.av.forex import AVForexReader 8 from pandas_datareader.av.quotes import AVQuotesReader 9 from pandas_datareader.av.sector import AVSectorPerformanceReader

~/.virtualenvs/py3-dev/lib/python3.7/site-packages/pandas_datareader/av/init.py in 1 import os 2 ----> 3 from pandas_datareader.base import _BaseReader 4 from pandas_datareader._utils import RemoteDataError 5

~/.virtualenvs/py3-dev/lib/python3.7/site-packages/pandas_datareader/base.py in 8 from pandas import read_csv, concat 9 from pandas.io.common import urlencode ---> 10 from pandas_datareader.compat import bytes_to_str, string_types, binary_type, \ 11 StringIO 12

~/.virtualenvs/py3-dev/lib/python3.7/site-packages/pandas_datareader/compat/init.py in 22 23 if PANDAS_0200: ---> 24 from pandas.util.testing import assert_raises_regex 25 26 def get_filepath_or_buffer(filepath_or_buffer, encoding=None,

ImportError: cannot import name 'assert_raises_regex' from 'pandas.util.testing' (/Users/XYZ/.virtualenvs/py3-dev/lib/python3.7/site-packages/pandas/util/testing.py) [3]:

Any solution or workaround?

thank-you. Rajeev

timkpaine commented 3 years ago

this seems to be an issue between your version of pandas and your version of pandas_datareader. If you can distill your error down to a problem in ffn itself, feel free to open another issue indicating the problem.