Danfo.js offers DataFrame and Series structures for labeled tabular data in JavaScript runtimes. It supports missing values, groupby, joins, IO, plotting, and TensorFlow.js tensor exchange.
Overview
Danfo.js brings pandas-like data structures to JavaScript for analytics and machine learning prep in Node or the browser. Series and DataFrames handle labeled columns, automatic alignment, and size-mutable schemas when you add or remove fields.
Core capabilities include groupby split-apply-combine, merging and joining, label-based slicing and queries, and IO from CSV, JSON, Excel, and related flat files. Integrations convert between arrays, objects, tensors, and differently indexed tables.
Time series helpers generate date ranges and expose datetime properties. Preprocessing utilities cover one-hot and label encoders plus scalers such as StandardScaler and MinMaxScaler on frames or series. A plotting API renders interactive charts for exploratory views.
Packages split between danfojs-node for server use and danfojs for bundlers, with a script tag build on jsDelivr for plain HTML pages. Documentation and community discussion live on the project site and GitHub.
Key features
- DataFrame and Series types
- Missing value handling
- Groupby aggregations and transforms
- Joins merges and alignment
- CSV JSON and Excel IO
- TensorFlow.js tensor conversion
- Encoding and scaling helpers
- Interactive plotting API
Use cases
- Browser-side data wrangling
- Node analytics pipelines
- ML feature preparation in JS
- Teaching pandas concepts in JavaScript
- Quick exploratory charts