first check the type of dataframe by using type(df)
and if showing series convert to da
df = df.to_frame()