Concatenating arrays according to a column : <p>I have a list of 2d arrays in python. For each 2d array the last column indicates an ID. Now I would like to join (perhaps with numpy) the rows of the arrays according to the ID (the last column).</p>

<p>So for example the rows with ID 1 should be concatenated. Each ID only appears once per array. In addition, the ID (last column) as well as the second last column should only be written at the very end of the concatenated array (i.e. only once).</p>

<p>How can this be done?</p>
