1

whenever i try to import pandas in jupyter notebook, i get the error as following:

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

How to fix it? i am just new to programming

Nafeez Quraishi
  • 5,380
  • 2
  • 27
  • 34
Bhavna Sehgal
  • 11
  • 1
  • 1
  • 3
  • 1
    You likely have mismatch/conflict of versions.. could be many things. Make sure you are using python 3 and installed the most up-to-date pandas for python 3 – rafaelc Jul 11 '19 at 15:15
  • https://stackoverflow.com/a/36649229/7470786 Your question already has an answer here. – Rarblack Jul 15 '19 at 12:46
  • Possible duplicate of [Importing Pandas gives error AttributeError: module 'pandas' has no attribute 'core' in iPython Notebook](https://stackoverflow.com/questions/36521691/importing-pandas-gives-error-attributeerror-module-pandas-has-no-attribute-c) – Rarblack Jul 15 '19 at 12:46

3 Answers3

2

Close the terminal. Restart jupyter notebook / lab fixes the problem.

Cora
  • 31
  • 4
1

I got this error as well, and just fixed it by just updating conda & pandas while using Anaconda

ocean800
  • 3,489
  • 13
  • 41
  • 73
0

I used to get the same:

AttributeError: module 'pandas' has no attribute '_libs' error

Whenever I used to open the old file in Jupyter notebook, but you can open a new file and then try importing the Pandas it will work.

AlSub
  • 1,384
  • 1
  • 14
  • 33