I'm trying to get the top 10 longest songs in my data frame by calling two columns using the code df.loc[['duration_min','name']].head()
. I have already sorted the relevant columns by descending order but when I run the code, I keep getting this error:
KeyError: "None of [Index(['duration_min', 'name'], dtype='object')] are in the [index]"
I was expecting the code to run without any problems