· via dev.to (home feed)
df-script brings a 43kB zero-dependency, Polars-style DataFrame engine to TypeScript
A new MIT-licensed library called df-script ships 300+ Polars-inspired DataFrame operations as a 43kB zero-dependency package for TypeScript and JavaScript, including joins, window functions and built-in CSV parsing.

A developer going by Trent Morris has released df-script, an open-source DataFrame engine for JavaScript and TypeScript that tries to bring Polars-style, expression-based data manipulation to environments where installing a heavyweight analytics stack is not an option. According to the announcement on dev.to, the library weighs 43kB, ships with zero dependencies and offers more than 300 declarative operations covering group-by aggregations, joins, windowed statistics, string parsing and temporal conversions.
The pitch: analytics without a backend
The dev.to post frames a familiar pain point: applications that need non-trivial data transformation often end up spinning up a dedicated backend service purely to run those operations, taking on deployment pipelines, network latency, serialization overhead and hosting costs along the way. The alternative — chaining .map(), .filter() and .reduce() in the client — repeatedly traverses the dataset and floods memory with intermediate objects, which the author argues degrades performance and can freeze the UI.
df-script's answer is a column-oriented engine that runs the work locally. Instead of leaning on high-level array iterators, the library is built around contiguous columnar loops, which the announcement claims sharply reduces intermediate object allocations and therefore garbage collection pressure. The author also states that every function in the library is backed by a dedicated one-to-one test suite covering extreme edge cases.
An expression API modelled on Polars
The API follows the declarative expression style familiar from Polars. Columns are referenced through $df.col(), transformed via composable method chains, and combined in operations such as groupBy().agg(), withColumns() and join(). The announcement demonstrates multi-column groupings where several aggregations — sums, rounded means, datetime extraction — are computed together and sorted, with full TypeScript type inference carried through to the output.
Ingestion is built in: the library parses CSV, JSON and NDJSON directly into its columnar storage, so raw text feeds can be loaded without pulling in third-party parser packages.
Windows, nested arrays and joins
Windowed analytics get first-class treatment through an .over() modifier. Cumulative sums, per-partition row numbers, rolling means and exponentially weighted moving averages can be computed without manually splitting, aggregating and re-merging groups. Nested arrays are handled through .arr.* expressions that filter, average or otherwise operate on list-typed columns.
On the relational side, df-script supports left, inner, outer, semi, anti and asof joins, with automatic suffixing when column names collide. A conditional helper, $df.when(...).then(...).otherwise(...), is provided for building derived categorical columns in a single expression.
Availability
df-script is MIT-licensed and installable from npm as df-script, with source code on GitHub under the trentamorris account. The project publishes hosted documentation and an interactive playground — including a full plain-text documentation dump explicitly aimed at LLM agents, a small sign of how new libraries are increasingly expected to be machine-readable as well as human-readable.
Why it matters
DataFrame tooling in the JavaScript ecosystem has long trailed Python's Pandas and Rust-backed engines like Polars, and that gap pushes heavy data work server-side even when the dataset would be trivial for a modern client CPU. A compact, dependency-free engine that runs in the browser or on Node could simplify the architecture of dashboards, internal data apps and edge deployments by removing the transform service altogether.
There are caveats. This is a young project announced by its own author, and the performance claims come from that announcement rather than independent benchmarks, so real-world throughput on large datasets remains an open question. Still, the pattern is worth watching: moving computation to where the data already lives is one of the more durable trends in application design, and df-script is a credible attempt to make that practical for JavaScript developers.
- #javascript
- #typescript
- #dataframe
- #open-source
- #data-engineering