My dataframe looks like this:
Method Dataset
A1 B2 10 20
B3 10 20
B1 10 20
B1 10 20
A2 B2 10 20
B1 10 20
A3 B9 10 20
B5 10 20
The Dataset
index is a string. How can I sort just the second (Dataset
) index using a list like ["B1", "B2", "B3", "B4", "B5"]
? I think I'm looking for sortindex()
but with custom ordering.