How to solve AttributeError: module 'pandas' has no attribute 'read_xlsx'

9.4k views Asked by At
AttributeError                            Traceback (most recent call last)
C:\Users\BAMIGB~1\AppData\Local\Temp/ipykernel_15512/4291769960.py in <module>
----> 1 data = pd.read_xlsx ('HRDataset_v14 ().xlsx')
      2 data

~\Anaconda3\lib\site-packages\pandas\__init__.py in __getattr__(name)
    242         return _SparseArray
    243 
--> 244     raise AttributeError(f"module 'pandas' has no attribute '{name}'")
    245 
    246 

AttributeError: module 'pandas' has no attribute 'read_xlsx'
1

There are 1 answers

0
Akhand pratap singh On

Instead of this [ data = pd.read_xlsx ('HRDataset_v14 ().xlsx') ] use

data = pd.read_excel ('filename.xlsx')