0

when I run the following code snippet:

import pandas as pd
nsfg = pd.read_hdf('nsfg.hdf5','nsfg')
type(nsfg)
nsfg.head()

I get the this error:

File "c:\Users\pro\OneDrive\سطح المكتب\main folder\data science\python for data analysis\pandas.py", line 1, in <module>
    import pandas as pd
  File "c:\Users\pro\OneDrive\سطح المكتب\main folder\data science\python for data analysis\pandas.py", line 2, in <module>
    nsfg = pd.read_hdf('nsfg.hdf5','nsfg')
AttributeError: partially initialized module 'pandas' has no attribute 'read_hdf' (most likely due to a circular import)
anosha_rehan
  • 1,522
  • 10
  • 17

0 Answers0