Numpy Array Vs Pandas Dataframe Group By Count In Python