Numpy Array Vs Pandas Dataframe Group By Aggregate