I have a dataframe as follow:
df
Col1 Col2
M1 4
M1 2
M1 1
M1 3
M2 3
M2 1
M2 2
I would like to sort the dataframe on python to achieve
Col1 Col2
M1 1
M1 2
M1 3
M1 4
M2 1
M2 2
M2 3
Any suggestion how to achieve this? Thank you
df.sort_values(['Col1','Col2'], inplace=True)?