I have the following dataframe let’s say:
df
A B C D E
z k s 7 d
z k s 6 l
x t r 2 e
x t r 1 x
u c r 8 f
u c r 9 h
y t s 5 l
y t s 2 o
And I would like to sort it based on col D for each sub row (that has for example same cols A,B and C in this case)
The expected output would be:
df
A B C D E
z k s 6 l
z k s 7 d
x t r 1 x
x t r 2 e
u c r 8 f
u c r 9 h
y t s 2 o
y t s 5 l
Any help for this kind of operation?