Difference Between Numpy Array And Dataframe Group By