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

incompatible with latest pandas #621

Open
nateGeorge opened this issue Feb 16, 2019 · 10 comments
Open

incompatible with latest pandas #621

nateGeorge opened this issue Feb 16, 2019 · 10 comments

Comments

@nateGeorge
Copy link

When importing this using pandas 0.24 versions, this error occurs:

---> 26 import odo
     27 import pytz
     28 from tqdm import tqdm

~/anaconda3/lib/python3.6/site-packages/odo/__init__.py in <module>
     27     from .backends.sas import sas7bdat
     28 with ignoring(ImportError):
---> 29     from .backends.pandas import pd
     30 with ignoring(ImportError):
     31     from .backends.bcolz import bcolz

~/anaconda3/lib/python3.6/site-packages/odo/backends/pandas.py in <module>
    100 
    101 
--> 102 @convert.register((pd.Timestamp, pd.Timedelta), (pd.tslib.NaTType, type(None)))
    103 def convert_null_or_nat_to_nat(n, **kwargs):
    104     return pd.NaT

AttributeError: module 'pandas' has no attribute 'tslib'
@kyleabeauchamp
Copy link

I also encountered this.

khaeru added a commit to khaeru/sdmx that referenced this issue Mar 20, 2019
@bartly
Copy link

bartly commented Apr 16, 2019

How to fix it ? Is there a resolution

@nateGeorge
Copy link
Author

Seeing as the build and docs are broken and it hasn't been updated in many months...seems like development has stalled.

@ryoung29
Copy link

ryoung29 commented Apr 20, 2019

I found a fix. In odo/backends/pandas.py line 94, change pd.tslib.NaTType to type(pd.NaT).
Also, the latest version on github has the fix, but I don't know if it's stable,

@timcera
Copy link
Contributor

timcera commented Apr 21, 2019 via email

@ryoung29
Copy link

@timcera yes, If you install the git version, it's working just fine.

@amoux
Copy link

amoux commented Jun 14, 2019

I found a fix. In odo/backends/pandas.py line 94, change pd.tslib.NaTType to type(pd.NaT).
Also, the latest version on github has the fix, but I don't know if it's stable,

I was able to import after making the change, thanks!!

@odoublewen
Copy link

@cpcloud @llllllllll Are there any maintainers who could make a new release?

khaeru added a commit to khaeru/sdmx that referenced this issue Jul 16, 2019
@fizwit
Copy link

fizwit commented Aug 8, 2019

Building Python 3.7.4 with odo-0.5.0

>>> import odo
/app/easybuild/software/Python/3.7.4-foss-2016b-fh1/lib/python3.7/site-packages/odo/backends/pandas.py:94: FutureWarning: pandas.tslib is deprecated and will be removed in a future version.
You can access NaTType as type(pandas.NaT)
  @convert.register((pd.Timestamp, pd.Timedelta), (pd.tslib.NaTType, type(None)))
>>> pandas.__version__
'0.23.4'

@songhao8080
Copy link

In [7]: import odo                                                                                                                                           
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-7-c46519caf147> in <module>
----> 1 import odo

~/.local/lib/python3.6/site-packages/odo/__init__.py in <module>
     27     from .backends.sas import sas7bdat
     28 with ignoring(ImportError):
---> 29     from .backends.pandas import pd
     30 with ignoring(ImportError):
     31     from .backends.bcolz import bcolz

~/.local/lib/python3.6/site-packages/odo/backends/pandas.py in <module>
     92 
     93 
---> 94 @convert.register((pd.Timestamp, pd.Timedelta), (pd.tslib.NaTType, type(None)))
     95 def convert_null_or_nat_to_nat(n, **kwargs):
     96     return pd.NaT

AttributeError: module 'pandas' has no attribute 'tslib'
                                                                                                                                                

In [8]: pandas.__version__                                                                                                                                   
Out[8]: '0.25.1'

In [9]:  

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

9 participants