Let's say I have the following dataframe:
Priority Color Risk
1 1 Green 8
2 9 Red 10
3 5 Orange 4
4 3 Green 8
5 3 Red 9
6 7 Orange 4
I would like to sort first on the 'color' column in the order of 'Red'> 'Orange'> 'Green'. Within that, I would like to sort on the 'priority' column in descending order (while maintaining the previous sort on the color column), and finally sort on the 'risk' column in descending order (while maintaining the previous sorts on the color and priority columns). So the result should look like this:
Priority Color Risk
2 9 Red 10
5 3 Red 9
6 7 Orange 4
3 5 Orange 4
4 3 Green 8
1 1 Green 8
Does anyone know how to do this?