From a list of (x,y) pairs, generate a new list of (x,ymean) pairs, where ymean is the average of all y's with the same x in the original list
Re-arranging / selecting of a data table very slow in For loop