Karina Data Scientist

Rolling Averages Within Groups

Moving averages that respect group boundaries

Smooth noisy data without mixing categories.

The rolling window never crosses group boundaries.

Parameters:

window=3 → Size of moving window
min_periods=1 → Calculate even with fewer values

Perfect for smoothing time series by category, region, or product line.

1 week ago | [YT] | 35