I want to sort a dataframe by multiple columns like this:
df.sort_values( by=[ 'A', 'B', 'C', 'D', 'E' ], inplace=True )
However i found out that python first sorts the uppercase values and then the lowercase.
I tried this:
df.sort_values( by=[ 'A', 'B', 'C', 'D', 'E' ], inplace=True, key=lambda x: x.str.lower() )
but i get this error:
TypeError: sort_values() got an unexpected keyword argument 'key'
If i could, i would turn all columns to lowercase but i want them as they are.
Any hints?