Numpy Scipy Matplotlib And Pandas Dataframe Group By Average