v0.71.0 - Add Rolling Window Aggregations to GroupedFrame (2026-04-10)¶
What Changed?¶
This release adds rolling window support to GroupedFrame aggregation methods, enabling time-series analysis and feature engineering workflows. Users can now compute rolling sum, mean, min, max, and custom aggregations within each group using the RollingOptions parameter. The feature maintains full backward compatibility with existing code.
What's New¶
Main Feature: Rolling Window Aggregations¶
What it does: Computes rolling aggregations within each group. Each row contains the aggregation result for the rolling window ending at that row. Window size is configurable, and results preserve all original rows while replacing specified columns with rolling values.
How to use it:
const df = BareFrame.fromColumns({
dept: ["eng", "eng", "eng", "hr", "hr"],
sales: [10, 20, 30, 5, 15],
});
// Rolling sum with window size 2
df.groupBy(["dept"]).sum(["sales"], { window: 2 });
// dept | sales
// eng | 10
// eng | 30
// eng | 50
// hr | 5
// hr | 20
Code example:
// Rolling sum
df.groupBy(["dept"]).sum(["sales"], { window: 2 });
// Rolling mean
df.groupBy(["dept"]).mean(["sales"], { window: 3 });
// Rolling min/max
df.groupBy(["dept"]).min(["value"], { window: 2 });
df.groupBy(["dept"]).max(["value"], { window: 2 });
// Custom rolling aggregation
const customFn: AggFn = (vals) => (vals as number[]).reduce((a, b) => a + b, 0);
df.groupBy(["dept"]).agg({ sales: customFn }, { window: 2 });
Added¶
RollingOptionstype for configuring rolling window aggregations- Rolling window support to
GroupedFrame.sum() - Rolling window support to
GroupedFrame.mean() - Rolling window support to
GroupedFrame.min() - Rolling window support to
GroupedFrame.max() - Rolling window support to
GroupedFrame.agg()
Changed¶
- None
Fixed¶
- None
Is It Safe to Upgrade?¶
- Breaking Changes: No
- Backward Compatible: Yes
All existing code continues to work unchanged. Aggregation methods now accept an optional RollingOptions parameter for rolling window operations.
Release Details¶
- Date: 2026-04-10
- Version: v0.71.0
- gaslamp: 132
- pilotlamp: 90
- Files Changed: 2
- Commits:
fbc7c887feat(frame): add rolling window aggregations to GroupedFrameccd35356docs(api): regenerate TypeDoc output632e3692bump: version 0.70.0 → 0.71.0
Known Issues¶
- None
Next Steps¶
Consider adding additional statistical aggregations (std, variance) or window positioning options (centered, backward-looking).