Reputation: 57
I have some numpy arrays that looks like this:
[[0,0,1],
[0,1,0],
[0,0,0]]
[[0,0,1],
[0,0,0],
[0,1,0]]
I want to order the rows so that every time I get a different array, it is ordered consistently. So for the two arrays shown above, I want to get the same result:
[[0,0,0],
[0,0,1],
[0,1,0]]
I thought about doing it as a data frame merging the columns and then sorting but I am not sure if this is the best way to do it.
Upvotes: 1
Views: 167