0

I'm trying to execute this simple code with pandas:

import pandas as pd 

df = pd.read_csv("file.csv")

df.head()

But I´m getting this error:

AttributeError: partially initialized module 'pandas' has no attribute 'read_csv' (most likely due to a circular import)

I've read some post but I´m not able to solve the problem, what should I do?

Filip Müller
  • 1,096
  • 5
  • 18

1 Answers1

1

so regarding your question:

1st: Check if your file is not the same name as the library that you are importing.(try not to use the name of the file of any other file as same as the name of the libraries you are using)

2nd : try to pip uninstall your library and reinstall it(it worked with me for most of the cases I had this problem)

3rd: If you didint find the right answer try checking the problem in the documentation, since I can see that a lot of people have stated this issue

Hopefully this helped you a lot and feel free to ask any question you want :)