Mar-09-2021, 11:02 AM
Just access the Dataframe and not the Series object:
The columns you need (
names = df.sort_values(["Sex", "Height"], ascending =[False, False])["Name"]
df["Name"]
will return a Series object of the column "Name".The columns you need (
"Sex", "Height"
), are not in the resulting series object.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
All humans together. We don't need politicians!