Skip to content
Advertisement

I keep getting the error message AttributeError: ‘pandas._libs.properties.AxisProperty’ object has no attribute ‘unique’. How should I fix this error?

I’m using a Jupyter notebook and I’m trying to open a data file and keep getting an error code AttributeError:’pandas._libs.properties.AxisProperty’ object has no attribute ‘unique’. This is my first time using Jupyter So I am not familiar with any error like this.

 import pandas as pd
 df = pd.DataFrame
 df - pd.read_csv("C:/Users/yusra/OneDrive/Documents/vgsales.csv")
 df

Advertisement

Answer

You are not using pd.DataFrame right. See below corrected code:

 import pandas as pd
 df=pd.read_csv("C:/Users/yusra/OneDrive/Documents/vgsales.csv")
 df
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement