pandas-dev / pandas

Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more
https://pandas.pydata.org
BSD 3-Clause "New" or "Revised" License
43.26k stars 17.8k forks source link

cannot import name 'OrderedDict' #31776

Closed aminemosbah closed 4 years ago

aminemosbah commented 4 years ago

cannot import name 'OrderedDict'

trying to work on collab and panda failed to import 'OrderedDict'

here is the code import pandas as pd data = pd.read_csv('/content/causalnex/fulcase_causal.csv', delimiter=';', index_col=0) data.head(5)

here is the message /usr/local/lib/python3.6/dist-packages/pandas/io/formats/html.py in () 8 from textwrap import dedent 9 ---> 10 from pandas.compat import OrderedDict, lzip, map, range, u, unichr, zip 11 12 from pandas.core.dtypes.generic import ABCMultiIndex

ImportError: cannot import name 'OrderedDict'

any suggestion

WillAyd commented 4 years ago

Hard to say from info provided but this hasn't existed in pandas for quite some time. You should try upgrading

aminemosbah commented 4 years ago

I m on collab it must have a compatible on

WillAyd commented 4 years ago

Gotcha. I assume an issue with however the colab was set up so hard to say.

Closing as I don't think a pandas issue, but if you can reproduce with pandas alone let us know and can reopen

aminemosbah commented 4 years ago

Yeep no issue we using a standalone pandas it only pups up with google collab without any impact on the workflow though ! However a bit annoying