Skip to content

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:

  1. Call df.lazy() to create a LazyDataFrame.
  2. Chain any combination of filter, select, withColumn, rename.
  3. Call collect() to execute all queued operations and get a DataFrame.

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

  • LazyOp type alias (internal) — discriminated union of deferred operations
  • LazyDataFrame class with filter(), select(), withColumn(), rename(), and collect() methods
  • DataFrame.lazy(): LazyDataFrame method

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:
    • 57a15ad feat(torch): add LazyOp type alias to frame.ts
    • 12b9f76 feat(torch): add LazyDataFrame class to frame.ts
    • 0ce727e feat(torch): add DataFrame.lazy() method
    • ab313d3 test(torch): add LazyDataFrame tests to frame.test.ts
    • c62e016 docs(torch): update docstrings for LazyDataFrame and its methods

Known Issues

  • LazyDataFrame (in frame.ts) is not yet included in the TypeDoc entry point and does not appear in the API reference

Next Steps

  • Integrate frame.ts into torch/index.ts after resolving the name conflict with the existing DataFrame