Skip to content

v0.69.0 - Add Cumulative Functions to GroupedFrame (2026-04-10)

What Changed?

This release adds four cumulative aggregation functions (cumsum, cumprod, cummax, cummin) to GroupedFrame. These functions compute running totals, products, and extrema within each group, enabling time-series and cumulative analysis workflows. The feature maintains full backward compatibility with existing code.


What's New

Main Feature: Cumulative Functions for GroupedFrame

What it does: Computes cumulative values (sum, product, max, min) within each group, returning all original rows with the specified column replaced by cumulative values. Non-numeric values are automatically skipped during accumulation.

How to use it:

TypeScript
const df = BareFrame.fromColumns({
  dept: ["eng", "eng", "eng", "hr", "hr"],
  sales: [10, 20, 30, 5, 15],
});

// Cumulative sum per group
df.groupBy(["dept"]).cumsum("sales");
// dept | sales
// eng  | 10
// eng  | 30
// eng  | 60
// hr   | 5
// hr   | 20

Code example:

TypeScript
// All four new methods follow the same pattern:
df.groupBy(["dept"]).cumsum("sales");    // Cumulative sum
df.groupBy(["dept"]).cumprod("factor");  // Cumulative product
df.groupBy(["dept"]).cummax("revenue");  // Cumulative maximum
df.groupBy(["dept"]).cummin("latency");  // Cumulative minimum

Added

  • GroupedFrame.cumsum(header: string) - Cumulative sum per group
  • GroupedFrame.cumprod(header: string) - Cumulative product per group
  • GroupedFrame.cummax(header: string) - Cumulative maximum per group
  • GroupedFrame.cummin(header: string) - Cumulative minimum per group

Changed

  • None

Fixed

  • None

Is It Safe to Upgrade?

  • Breaking Changes: No
  • Backward Compatible: Yes

All existing code continues to work unchanged. New methods are additive only.


Release Details

  • Date: 2026-04-10
  • Version: v0.69.0
  • gaslamp: 130
  • pilotlamp: 88
  • Files Changed: 2
  • Commits:
  • 7320c0c6 feat(frame): add cumulative functions to GroupedFrame
  • d682654e docs(api): regenerate TypeDoc output
  • 8edaf116 bump: version 0.68.1 → 0.69.0

Known Issues

  • None

Next Steps

Consider adding cumulative functions to BareFrame if use cases for global (non-grouped) cumulative operations emerge.