Skip to content

COMPAT: Make is_number import backwards-compat #309

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

Merged
merged 1 commit into from
May 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,3 @@ script:

after_success:
- coveralls

9 changes: 9 additions & 0 deletions pandas_datareader/compat/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
# flake8: noqa
import pandas as pd

from io import BytesIO
from distutils.version import LooseVersion

pandas_version = LooseVersion(pd.__version__)
if pandas_version <= '0.19.2':
from pandas.core.common import is_number
else:
from pandas.api.types import is_number
7 changes: 2 additions & 5 deletions pandas_datareader/edgar.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,13 @@
from ftplib import FTP
import gzip

from pandas import read_csv
from pandas import DataFrame
from pandas import to_datetime
from zipfile import ZipFile
from pandas.compat import StringIO
from pandas.api.types import is_number
from pandas import read_csv, DataFrame, to_datetime

from pandas_datareader.base import _BaseReader
from pandas_datareader.compat import BytesIO
from pandas_datareader._utils import RemoteDataError
from pandas_datareader.compat import BytesIO, is_number


_URL_FULL = 'edgar/full-index/master.zip'
Expand Down