Make Numpy Array From Pandas Dataframe Group By Count Sql Syntax