v0.35.0 - DataFrame Expansion for frame.ts (2026-03-22)¶
What Changed?¶
This release expands the experimental DataFrame implementation in frame.ts (exported as DataFrameV2) with a full set of transformation, display, and I/O methods.
The new methods cover row slicing, sorting, concatenation, inner joins, table display, and Google Sheets integration.
All additions follow the same design principle as the existing frame.ts: no dependency on FlameWright or AfterGlow, with full delegation to convert.ts.
What's New¶
Main Feature: DataFrame method expansion (frame.ts)¶
What it does:
Adds the most commonly needed DataFrame operations to the experimental DataFrameV2 class, bringing it closer to feature parity with the existing DataFrame in dataframe/.
How to use it:
import { DataFrameV2 as DataFrame } from "gaslamp";
const df = DataFrame.fromColumns({
name: ["Charlie", "Alice", "Bob"],
age: [35, 25, 30],
});
// Slicing
df.head(2); // first 2 rows
df.tail(2); // last 2 rows
df.slice(1, 3); // rows 1–2
// Sorting
df.sort("age"); // ascending
df.sort("age", false); // descending
// Concatenation
const df2 = DataFrame.fromColumns({ name: ["Diana"], age: [28] });
df.concat(df2); // append rows
// Join
const scores = DataFrame.fromColumns({ name: ["Alice", "Bob"], score: [90, 80] });
df.join(scores, "name"); // inner join (default)
// Display
df.toString(); // "DataFrame(3 rows × 2 cols, headers=[name, age])"
df.toTableString(); // markdown-style table
df.display(); // alias for toTableString
// Google Sheets
const sheet = SpreadsheetApp.getActiveSheet();
const dfFromSheet = DataFrame.fromSheet(sheet);
const range = sheet.getRange("A1:B10");
const dfFromRange = DataFrame.fromRange(range);
Added¶
DataFrame.slice(start, end?)— row range selection followingArray.prototype.slicesemanticsDataFrame.head(n=5)— firstnrowsDataFrame.tail(n=5)— lastnrowsDataFrame.sort(by, ascending=true)— sort by column; nulls always lastDataFrame.concat(other)— vertical concatenation; headers must match in orderDataFrame.join(other, on, how="inner")— dispatches to join variantsDataFrame.joinInner(other, on)— inner join on a columnDataFrame.joinLeft(other, on)— placeholder (not yet implemented)DataFrame.joinRight(other, on)— placeholder (not yet implemented)DataFrame.joinOuter(other, on)— placeholder (not yet implemented)DataFrame.toString()— one-line summary stringDataFrame.toTableString(maxRows?, maxColWidth?)— markdown-style tableDataFrame.display(maxRows?, maxColWidth?)— alias fortoTableStringDataFrame.fromRange(range, header=true)— factory from GAS RangeDataFrame.fromSheet(sheet, header=true)— factory from GAS Sheet- 48 new tests covering all added methods in
frame.test.ts
Changed¶
concatimplementation now uses direct column array spread instead oftoRows/rowsToMaproundtrip (memory efficiency improvement)tailimplementation simplified toslice(-n)using native negative index support
Fixed¶
fromRange(range, false): previously discarded the first row instead of treating all rows as data; now generates numeric column names ("0","1", ...) and passes all rows as data
Is It Safe to Upgrade?¶
- Breaking Changes: No
- Backward Compatible: Yes
All changes are additive. The DataFrameV2 export is marked @alpha and is independent of the stable DataFrame in dataframe/. Existing code is unaffected.
Release Details¶
- Date: 2026-03-22
- Version: v0.35.0
- gaslamp: version 78
- pilotlamp: version 35
- Files Changed: 3 (
frame.ts,torch/index.ts,frame.test.ts) - Commits:
ec10e0fbump: version 0.34.0 → 0.35.09d4b9a5test(torch): add tests for fromRange and fromSheet766fd2ctest(torch): add tests for toString, toTableString, displayb66e4d1test(torch): add tests for concat, joinInner, join2fab088test(torch): add tests for sorte507314test(torch): add tests for slice, head, tail922e84cfix(torch): fix fromRange when header=false0be37b9feat(torch): add fromRange and fromSheet649da08feat(torch): add toString, toTableString, display58e8828feat(torch): add joinLeft, joinRight, joinOuter placeholders7cc609frefactor(torch): improve concat implementationae84f51feat(torch): add concat, join, and joinInner240d562feat(torch): add sort8e4bfe0fix(torch): simplify tail to use slice(-n)a100133feat(torch): add slice, head, tail690fa7bdocs(api): regenerate TypeDoc API reference66caee4docs(api): add TypeDoc pages for DataFrameV2 aliases861dcc1feat(torch): export frame.ts classes as DataFrameV2 aliases
Known Issues¶
joinLeft,joinRight,joinOuterare placeholders and throw"not yet implemented"when called.DataFrameV2is@alpha— API may change or be removed without notice.
Next Steps¶
- Implement
joinLeft,joinRight,joinOuter - Evaluate
DataFrameV2as a replacement candidate for the existingDataFrameindataframe/ - Add
toCSV/toJSONoutput methods toframe.ts