v0.34.0 - LazyDataFrame (2026-03-22)¶
What Changed?¶
This release adds LazyDataFrame and DataFrame.lazy() to the torch module.
Users can now chain multiple transformations (filter, select, withColumn,
rename) without executing them immediately, then materialize the result with
collect().
No existing APIs were changed.
What's New¶
Main Feature: DataFrame.lazy / LazyDataFrame¶
What it does:
Wraps a DataFrame in a lazy evaluation context.
Transformation operations are queued as LazyOp entries and applied only
when collect() is called, avoiding intermediate DataFrame allocations for
each step.
How to use it:
- Call
df.lazy()to create aLazyDataFrame. - Chain any combination of
filter,select,withColumn,rename. - Call
collect()to execute all queued operations and get aDataFrame.
Code example:
TypeScript
const df = DataFrame.fromColumns({
name: ["Alice", "Bob", "Charlie"],
age: [25, 17, 30],
city: ["Tokyo", "London", "Paris"],
});
const result = df
.lazy()
.filter((row) => (row.get("age") as number) >= 18)
.select(["name", "city"])
.rename({ city: "location" })
.collect();
// name | location
// Alice | Tokyo
// Charlie | Paris
Added¶
LazyOptype alias (internal) — discriminated union of deferred operationsLazyDataFrameclass withfilter(),select(),withColumn(),rename(), andcollect()methodsDataFrame.lazy(): LazyDataFramemethod
Changed¶
- Nothing (no existing API was modified)
Fixed¶
- Nothing
Is It Safe to Upgrade?¶
- Breaking Changes: No
- Backward Compatible: Yes
Existing DataFrame code continues to work without changes.
Release Details¶
- Date: 2026-03-22
- Version: v0.34.0
- gaslamp: clasp version 77
- pilotlamp: clasp version 34
- Files Changed: 2 (
src/torch/frame.ts,__tests__/torch/frame.test.ts) - Commits:
57a15adfeat(torch): add LazyOp type alias to frame.ts12b9f76feat(torch): add LazyDataFrame class to frame.ts0ce727efeat(torch): add DataFrame.lazy() methodab313d3test(torch): add LazyDataFrame tests to frame.test.tsc62e016docs(torch): update docstrings for LazyDataFrame and its methods
Known Issues¶
LazyDataFrame(inframe.ts) is not yet included in the TypeDoc entry point and does not appear in the API reference
Next Steps¶
- Integrate
frame.tsintotorch/index.tsafter resolving the name conflict with the existingDataFrame