Totals by Week and Month

Totals by Week and Month: Totals by Week and Month: resample.

Updated

  1. Totals by Week and Month: resample (Journeyman): Total a column by month with groupby on dt.to_period('M'), and by week with resample('W') on a date index, which labels each week by the Sunday it ends on and keeps every week from the first to the last, so a week with no orders shows as 0 instead of disappearing, while its mean is NaN.