Numpy Array Loop Through Pandas Dataframe Groupby