I am running a iPython notebook via the Anaconda Navigator app (version 1.1.0). When I want to import pandas it gives me a strange error. I thought the Anaconda app included
You can try the below command
conda upgrade --all
and try to restart the notebook.
Hope this helps
I have just solved this problem. Recently, I changed my language setting of my MacBook from English-UK to Chinese. And I suppose that setting will also change the setting in the "locale." Becuase when I switched back, I found that the setting of locale had been changed again, and I am fine to import the pandas again,.
So if you have changed the language setting recently, you may worth to have a try change it back.
I got this from using the Anaconda default environment instead of my custom one with pandas installed.
Changing to the right environment and reopening the Jupyter notebooks did not fix this for me (python 3.7, pandas 0.23.0). Restarting Anaconda did.
Apparently the error I got when trying to import pandas for the first time was ValueError: unknown locale: UTF-8
Trying to import again afterwards, gave another error as described in my question above.
I found the solution to solve the ValueError on IPython Notebook locale error
After updating my bash profile, the error AttributeError: module 'pandas' has no attribute 'core'
did not appear anymore.
I had the same problem after installing TensorFlow package, which downgraded my pandas version from 2.23 to 2.22. I tried all the solutions proposed above + the one suggested by post author, linked here. What eventually worked for me was to reinstall Anaconda distribution.
I face similar issue while importing TensorFlow
. If you are using Tensorflow which uses Pandas library, I suggest restarting your kernel of Anaconda
. This works for me.