Skip to content

incompatible with latest pandas #621

Open

Description

@nateGeorge

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'

Activity

  1. kyleabeauchamp commented on Mar 8, 2019

    @kyleabeauchamp

    I also encountered this.

  2. bartly commented on Apr 16, 2019

    @bartly

    How to fix it ? Is there a resolution

  3. nateGeorge commented on Apr 16, 2019

    @nateGeorge
    Author

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

  4. ryoung29 commented on Apr 20, 2019

    @ryoung29

    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,

  5. timcera commented on Apr 21, 2019

    @timcera
    Contributor
  6. ryoung29 commented on Apr 24, 2019

    @ryoung29

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

  7. amoux commented on Jun 14, 2019

    @amoux

    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!!

  8. odoublewen commented on Jul 10, 2019

    @odoublewen

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

  9. fizwit commented on Aug 8, 2019

    @fizwit

    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'
    
  10. songhao8080 commented on Sep 27, 2019

    @songhao8080
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions