rolling

fnSeries rolling(Series s, size_t windowSize, size_t minPeriods, string agg) @trusted

Computes a rolling aggregation over fixed-width receding frames (ADR-2026-10-24-17): row i sees [max(0, i - windowSize + 1) .. i] inclusive; minPeriods (default 1) nulls rows with too few valid slots; nulls are skipped (not counted); the float association is the chunk-ordered serial left fold.

Parameters

sthe input Series
windowSizethe receding frame width (at least 1)
minPeriodsthe minimum valid slots for a non-null output
agg"sum", "mean", "count", "min", or "max"

Returns

the rolling-aggregated Series.

Throws

DataFrameException on unsupported kinds or invalid widths.
fnSeries rolling(Series s, size_t windowSize, size_t minPeriods, string agg, size_t ddof) @trusted

Ditto, with the dispersion degrees of freedom: ddof applies to the "std" and "variance" aggregations only (default 1; a window whose valid count is <= ddof reads null; ADR-2026-10-28-01).

Parameters

sthe value column
windowSizethe receding frame width (at least 1)
minPeriodsthe minimum valid slots for a non-null output
aggthe aggregation name
ddofthe dispersion degrees of freedom

Returns

the per-window aggregation (FLOAT64).

Throws

DataFrameException on invalid widths, an unknown

aggregation, or ddof passed for a non-dispersion aggregation.