I'm currently learning Python and I'm trying to sort an array. As the title is problably not very specific I'm gonna give an exemple of what I'm tring to do : I have an array like that :
a = array([[1, 2],
[0, 5],
[0, 3],
[1, 0]])
But with much more rows and higher numbers and I would like that :
a = array([[0, 3],
[0, 5],
[1, 0],
[1, 2]])
For the moment I managed to obtain this :
a = array([[0, 5],
[0, 3],
[1, 5],
[1, 0]])
by using
a = a[a[:, 0].argsort()]
But I'm stuck there and I haven't found help for my problem anywhere and I don't have any idea how to procede...
Could anyone help me please ?