v0.44.1 - GroupedFrame Column-Oriented Refactor (2026-03-27)¶
What Changed?¶
This release refactors the internal implementation of GroupedFrame and BareFrame.groupBy
to a column-oriented, index-based approach.
No public API changes — existing code using groupBy, count, first, last, and agg continues to work unchanged.
Memory usage for grouped operations is significantly reduced.
What's New¶
Main Feature: Column-Oriented GroupedFrame¶
What it does:
Previously, groupBy converted all data to row Maps, then stored a separate BareFrame
copy for each group. Now it works directly on columns, storing only row index arrays per group
and a single reference to the source frame.
How to use it: No changes required — the public API is identical.
TypeScript
const df = BareFrame.fromColumns({
dept: ["eng", "eng", "hr"],
score: [80, 90, 70],
});
df.groupBy(["dept"]).count();
// dept | count
// eng | 2
// hr | 1
df.groupBy(["dept"]).agg({
score: (vals) => (vals as number[]).reduce((a, b) => a + b, 0),
});
// dept | score
// eng | 170
// hr | 70
Added¶
makeCompositeKey(): module-private helper that builds a type-prefixed, null-separated composite key string from column values at a given row index — replacesJSON.stringifyfor faster, collision-safe key generationBareFrame._getColumn():@internalaccessor that returns the raw column array by reference, used byGroupedFrameaggregation methods without copying data
Changed¶
GroupedFrameconstructor signature changed from(keys, groups: Map<string, BareFrame>)to(keys, source: BareFrame, indices: Map<string, number[]>)—@internal, no impact on user codeBareFrame.groupBy: rewrote to column-oriented loop; eliminatesmapToRows()call during groupingGroupedFrame.count / first / last / agg: rewrote to fetch values directly from source frame via row indices; eliminates per-groupBareFrameallocationGroupedFramedocstring andgroupBydocstring updated to reflect the new internal design
Fixed¶
BareFrame._getColumnerror message no longer exposes the internal method name (_getColumn) — replaced with[internal]prefix
Is It Safe to Upgrade?¶
- Breaking Changes: No
- Backward Compatible: Yes
All public methods (groupBy, count, first, last, agg) retain identical signatures and behavior.
Release Details¶
- Date: 2026-03-27
- Version: v0.44.1
- gaslamp: version 96
- pilotlamp: version 54
- Files Changed: 1 (
src/v2/frame.ts) - Commits:
- 531711a8 fix(v2): hide internal method name from _getColumn error message
- d3caa68a docs(v2): update GroupedFrame and groupBy docstrings for column-oriented design
- 55b47582 refactor(v2): rewrite GroupedFrame to column-oriented index-based approach
- 0b09f2ee refactor(v2): add makeCompositeKey helper and _getColumn accessor
Known Issues¶
- None
Next Steps¶
- Continue v2 migration: remaining
src/torch/methods not yet ported tosrc/v2/