Skip to content

Molniya

Ergonomic data analysis for TypeScript.

A simple, typed DataFrame library. In-memory, zero dependencies, and blazing fast with SIMD line finding.

Get Started
bun add molniya

Everything you need

A complete toolset for data manipulation and analysis, built for the modern TypeScript ecosystem.

Bulletproof Type Safety

Molniya leverages TypeScript's advanced type system to infer schemas directly from your data. Get full autocomplete and compile-time checks for your column names and types.

const df = readCsv("data.csv");
// df.col("invalid") ➔ Error!
// df.col("price").sum() ➔ Correctly typed

Blazing Fast I/O

SIMD-accelerated line finding and direct byte parsing. 7.3M rows in 1.2s.

Familiar API

Pandas/Polars inspired syntax. filter, groupby, and select just work.

Lazy Frames

Work with datasets larger than RAM. Process data in streams without loading the whole file.

Zero Deps

Lightweight and portable. No heavy C++ binaries or complex native dependencies.

Advanced Aggregations

Robust GroupBy engine with support for sum, mean, std, and custom collectors.

// Grouping made easy
df.groupby("category").agg({
  "price": "mean",
  "quantity": "sum"
});

Designed for Developers

A familiar API that feels like Pandas, powered by a high-performance engine designed for the TypeScript ecosystem.

analysis.ts
import { readCsv } from 'molniya';

// Blazing fast SIMD-accelerated reading
const { df } = await readCsv('bitcoin_7m_rows.csv', {
  delimiter: ',',
  hasHeader: true
});

console.log(df.shape); // [7381118, 8]
console.log(df.head(5));
Terminal
✓ Loaded 7,381,118 rows in 1.28s [7381118, 8] DataFrame

Real-World Performance

Loading 387MB (7.3M rows) Bitcoin CSV dataset.

Molniya (Bun)1.28s
Arquero (Node)~9.11.4s
Danfo.js (Node)~70.1s

* Benchmarks performed on M1 MacBook Air. Arquero and Danfo run on Node.js using their standard CSV utilities.

$bun add molniya

Released under the MIT License.