rules/time-series/gap-unsafe-lag.md
Gap-unsafe row lag or rolling window
Row-counted .shift(n), .rolling(n), .diff(n), .pct_change(n), .ewm(...) without times=, and Polars .rolling_*(n) count rows rather than elapsed calendar time. When timestamps have gaps, regularize the grid first with .asfreq(...), .resample(...), or .upsample(...), or use calendar-aware freq=, time-offset windows, or .rolling_*_by(...).