Search code examples
pythonpandaswindowsjupyter-notebookimporterror

How do I fix this ImportError in Jupyter Notebook?


I need to use pandas for my project and whenever I write:

import pandas as pd

this error comes up:

ImportError: cannot import name 'infer_dtype_from_scalar' from partially initialized module 'pandas.core.dtypes.cast' (most likely due to a circular import) (C:\Users\Soorya Suresh\Anaconda\lib\site-packages\pandas\core\dtypes\cast.py)

let me know how I can fix this so I can work with pandas!


Solution

  • Try pip uninstall pandas and pip install pandas then try to import it again.