Home > Software design >  Show Average Per Month
Show Average Per Month

Time:07-10

I have the following dataset: enter image description here

Also, you can use the below code to create a bar chart, which I think might be more relevant in your case. There are many many other graphs you can try out as well...

df=pd.read_excel('myinput.xlsx', 'Sheet19')
avg = df.groupby(pd.PeriodIndex(df['Date'], freq="M"))['Task Count'].mean().to_frame().reset_index()
avg = avg.rename(columns = {"Task Count":'Avg # of Task'})
plt=avg.plot(kind='bar',x="Date", y="Avg # of Task",figsize=(5,5))

enter image description here

  • Related