groupByDynamic

fnDataFrame groupByDynamic(DataFrame df, string timeColumn, long every, long period, long offset = 0, Closed closed = Closed.LEFT, size_t minPeriods = 1, AggSpec[] specs...) @trusted

The dynamic time buckets (ADR-2026-10-30-03): windows anchored at epoch + offset, advancing by every, each row joining every bucket whose period contains it - Closed.LEFT the [start, start + period) convention, Closed.RIGHT the (start, start + period]. Overlapping periods (period > every) admit a row into several buckets; empty buckets are not emitted; the label column carries the bucket start. Sorted input is not required. Buckets with fewer than minPeriods member rows drop. The time column is DATETIME or DATE; every/period/offset are fixed nanosecond durations (the dur* constructors; calendar strides are operations, not windows). Null timestamps drop from every bucket. The supported aggregates are the GroupBy column kernels (sum, count, mean, min, max, first, last, product, collect); the parameterized statistics reject - the rolling surface owns dispersion over time windows.

Parameters

dfthe frame
timeColumnthe DATETIME or DATE column
everythe bucket stride (nanoseconds; positive)
periodthe bucket width (nanoseconds; positive; defaults to every)
offsetthe epoch offset (nanoseconds)
closedthe bucket edge convention
minPeriodsthe minimum member rows per emitted bucket
specsthe aggregation specifications

Returns

the bucket-label frame plus one column per spec, in

bucket-start order.

Throws

DataFrameException on non-positive widths, kind

violations, unknown columns or the rejected aggregate kinds.