Using the melted form, return the average cups per day

pandas · from Wide and long form

.melt().pivot()id_varsvalue_varsvar_nametidy data

Putting the kettle on…

Starting up…

Exercise 2

Using the melted form, return the average cups per day.

your answer
stuck? the lesson behind it
Wide and long form
Compute in long form, present in wide. Most awkward pandas is a shape problem.