Skip to content

v0.55.0 - Add sum/mean/min/max aggregation to GroupedFrame (2026-03-28)

What Changed?

This release adds four numeric aggregation methods — sum, mean, min, and max — to GroupedFrame. Each method accepts a list of column names, applies the corresponding aggregation per group, and delegates to the existing agg method internally. Non-numeric cells are silently excluded; groups with no numeric values return null instead of 0 or Infinity.


What's New

Main Feature: GroupedFrame numeric aggregation methods

What it does: Provides shorthand aggregation methods for common numeric operations on grouped DataFrames. Each method filters out non-numeric cells before computing, making them safe to use with mixed-type spreadsheet data.

How to use it: Call .groupBy([key]).sum([col]), .mean([col]), .min([col]), or .max([col]) on a BareFrame.

Code example:

TypeScript
const df = BareFrame.fromColumns({
  dept:  ["eng", "eng", "hr"],
  score: [80, 90, 70],
  bonus: [10, 20, 5],
});

df.groupBy(["dept"]).sum(["score", "bonus"]);
// dept | score | bonus
// eng  | 170   | 30
// hr   | 70    | 5

df.groupBy(["dept"]).mean(["score"]);
// dept | score
// eng  | 85
// hr   | 70

df.groupBy(["dept"]).min(["score"]);
// dept | score
// eng  | 80
// hr   | 70

df.groupBy(["dept"]).max(["score"]);
// dept | score
// eng  | 90
// hr   | 70

Added

  • GroupedFrame.sum(headers) — sum of numeric values per group
  • GroupedFrame.mean(headers) — arithmetic mean of numeric values per group
  • GroupedFrame.min(headers) — minimum numeric value per group
  • GroupedFrame.max(headers) — maximum numeric value per group
  • Tests for all four methods (normal values, mixed data, all-non-numeric → null, missing column error)

Changed

  • Docstrings for sum, mean, min, max: expanded @remarks, added mixed-data and error @example blocks, added @function tag

Fixed

  • Nothing

Is It Safe to Upgrade?

  • Breaking Changes: No
  • Backward Compatible: Yes

All changes are additive. No existing methods or types were modified.


Release Details

  • Date: 2026-03-28
  • Version: v0.55.0
  • gaslamp: 114
  • pilotlamp: 72
  • Files Changed: 13
  • Commits:
  • ee5a9fb2 feat(torch): add sum/mean/min/max aggregation methods to GroupedFrame
  • 68ff078a docs(torch): update docstrings and add tests for GroupedFrame sum/mean/min/max

Known Issues

  • None

Next Steps

  • Continue expanding GroupedFrame aggregation coverage (e.g. median, std)