Here is my solution using only numpy arrays...
import numpy as np
arr = np.array([[ 0, 1, 2], [ 1, 1, 6], [ 2, 2, 10], [ 3, 2, 14]])
lst = []
compt = 0
for index in range(1, max(arr[:, 1]) + 1):
lst.append([compt, index, np.sum(arr[arr[:, 1] == index][:, 2])])
lst = np.array(lst)
print lst
# lst, outputs...
# [[ 0 1 8]
# [ 0 2 24]]
The tricky part is the np.sum(arr[arr[:, 1] == index][:, 2]), so let's break it down to multiple parts.
arr[arr[:, 1] == index] means...
You have an array arr, on which we ask numpy the rows that matches the value of the for loop. Here, it is set from 1, to the maximum value of element of the 2nd column (meaning, column with index 1). Printing only this expression in the for loop results in...
# First iteration
[[0 1 2]
[1 1 6]]
# Second iteration
[[ 2 2 10]
[ 3 2 14]]
Adding [:, 2] to our expression, it means that we want the value of the 3rd column (meaning index 2), of our above lists. If I print arr[arr[:, 1] == index][:, 2], it would give me... [2, 6] at first iteration, and [10, 14] at the second.
I just need to sum these values using np.sum(), and to format my output list accordingly. :)