I have a list
[[0, 3], [5, 1], [2, 1], [4, 5]]
which I did in an array using numpy.array:
[[0 3]
[5 1]
[2 1]
[4 5]]
How to sort this as a table? In particular, I want to sort by the second column in ascending order and then resolve any relationships, having the first column sorted in ascending order. Therefore, I wish:
[[2 1]
[5 1]
[0 3]
[4 5]]
Any help would be greatly appreciated!
Derek source
share