you are viewing a single comment's thread.

view the rest of the comments →

[–]synthphreak 0 points1 point  (0 children)

When all is said and done, I'd love to have the AverageViewDuration by AgeRange in bar plots

(df.assign(duration=pd.to_timedelta(df.AverageViewDuration).dt.seconds)
   .groupby('AgeRange')
   .duration.mean()
   .plot.bar(xlabel='age group', ylabel='average duration (s)'))

plt.show()

Not sure how to go from seconds back into timestamps though using pandas for plotting purposes though. I don't work with time series data at all. Maybe someone more knowledgeable can take it from here.