As title, for example, I have an 2d numpy array, like the one below,
[[33, 21, 1],
[33, 21, 2],
[32, 22, 0],
[33, 21, 3],
[34, 34, 1]]
and I want to extract these rows orderly based on the content in the first and the second column, in this case, I want to get 3 different 2d numpy arrays, as below,
[[33, 21, 1],
[33, 21, 2],
[33, 21, 3]]
and
[[32, 22, 0]]
and
[[34, 34, 1]]
What function in numpy could I use to do this? I think the point is to distinguish different rows with their first and second columns. If elements in these columns are the same, then the specific rows are categorized in the same output array. I want to write a python function to do this kind of job, because I could have a much more bigger array than the one above. Feel free to give me advice, thank you.