Turn Array Into Pandas Dataframe Group By Average