danfojs: a pandas-shaped dataframe library for JavaScript, and the gap in its own CI
Danfo.js is an open source, JavaScript library providing high performance, intuitive, and easy to use data structures for manipulating and processing structured data.
At a glance
- What is it?
- Danfo.js copies pandas API shape into TypeScript, ships separate browser and Node packages, and still has badges pointing at a repository that is not this one.
- Who is it for?
- Danfo.js is a real implementation rather than a naming exercise: the install layout, the separate browser and Node packages, and the plotting chain that goes straight from a CSV read to a rendered chart are all there. The pandas-shaped API is the point, and if you already know pandas you will be productive in an hour.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 175 days ago.
- What is it written in?
- Mainly TypeScript, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 22, 2026, and from our analysis. They are not legal advice.
Editorial analysis
Two packages, because browser and Node are genuinely different
The install section is the clearest statement of intent in this README. Node applications get `danfojs-node`, while applications built with React, Vue or Next.js get the browser build `danfojs`. The split is not cosmetic: the Node package reads local files and URLs, and the browser build cannot.
npm install danfojs-node
or
yarn add danfojs-nodeFor a plain HTML page with no build step, the third option is a script tag from JsDelivr, and the version is pinned there rather than left floating:
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/bundle.js"></script>That pinned version is worth pausing on. The most recent tagged release is v1.2.0 from April 2025, and the root `package.json` also reads 1.2.0, so a reader following the CDN snippet verbatim is a full minor version behind the newest tag. Not broken, just worth knowing before you file a bug against behaviour that changed in 1.2.0.
The root `package.json` is the interesting file for understanding the layout. It is marked private, declares yarn workspaces for `danfojs-node` and `danfojs-browser`, and its install script walks into `src/danfojs-base` and then into both leaf packages. So the published artifacts are two, and the shared code lives in a third directory that is not published under either name.
The API is pandas on purpose, down to the method names
The README states the design goal plainly: the library is heavily inspired by pandas and provides a similar API, so users familiar with pandas can pick it up easily. That is a stronger and more useful commitment than it sounds, because it means the method names are the ones a pandas user already has in their fingers.
The Node example shows the shape. It reads the Stanford Titanic CSV used in that course, then calls the pandas sequence: `head()` to print the first rows, `describe()` for descriptive statistics on numeric columns, `shape` and `columns` to inspect structure, `ctypes` to see inferred dtypes, and bracket access to pull out a single column.
const dfd = require("danfojs-node");That last line is the whole import surface for Node. Everything else hangs off `dfd`, and the objects it returns are DataFrame and Series types with methods that mirror their pandas counterparts: `loc` and `iloc` for label and positional selection, `query` for filtering, `merge` and `concat` for combining, `setIndex` for reindexing, and `groupby` for split-apply-combine. The feature list also names `head`, `plot`, and `print`, which are Danfo additions rather than pandas ones.
Plotting that renders straight from a promise chain
The browser example is the most convincing part of the README, because it shows the library doing something other libraries of this kind make you do by hand. A CSV is read, and the resulting frame is rendered three ways into three divs in the same chain.
The first call plots a single column as a box plot, the second renders the frame as an HTML table, and the third reindexes on the Date column and draws a line chart restricted to two named columns. The `.plot()` method returns a plotter object, and `.box()`, `.table()` and `.line()` on that object choose the rendering, with a `config` object passed through for things like which columns to include.
df['AAPL.Open'].plot("div1").box() //makes a box plot
df.plot("div2").table() //display csv as tableSo the plotting layer is plot-then-choose rather than one method per chart type, and it targets a DOM node id by string. That is the older JavaScript charting idiom, closer to how a D3 example is usually written than to how a React charting component is set up, and it will feel dated to anyone building a component tree. On the plus side, nothing about the API assumes a framework, which is why the same code works in a plain HTML file.
The feature list also claims interactive plotting, which the examples do not demonstrate.
TensorFlow.js tensors and the preprocessing layer
Two claims in the feature list are worth separating from the pandas compatibility story, because they point beyond dataframe work.
The first is native TensorFlow.js tensor support. The library states that it supports TensorFlow.js tensors out of the box and that you can convert a Danfo data structure to tensors, with the API reference linked for the `dataframe.tensor` method. Topics on the repository include `tensorflow` and `tensors`, so this is a deliberate direction rather than an accident. For a browser library, being able to hand a frame to a machine learning runtime without a manual conversion loop is the single most differentiating feature here, since Pandas users have to reach for numpy arrays and lose the labels on the way.
The second is the preprocessing set: `OneHotEncoder`, `LabelEncoder`, `StandardScaler` and `MinMaxScaler`, all operating on DataFrame and Series. Combined with `readCSV`, `readJSON` and Excel loading, that covers the pipeline a browser-side data science notebook needs. Missing data is handled as `NaN` in both floating point and non-floating point columns, which is a small detail that shows the design was considered rather than ported mechanically.
Badges, branch names and a 101-issue backlog
Several signals in this repository disagree with each other, and reading them together tells you more about the project's state than any single number.
The repository is `javascriptdata/danfojs`, but the CI badge points at `github.com/opensource9ja/danfojs` and the coverage badge does the same. The default branch is `dev`, while the Node.js CI badge is pinned to `master`. The root script in `package.json` has to `cd` into each package directory and run yarn three times to get a working tree, and the tree itself is shallow, listing `src/` and an `assets/` directory without the detail needed to judge how the shared base is split.
The last push was on 2026-04-15, and the newest release, v1.2.0, dates from 2025-04-03. Between those two dates sits the v1.2.0 release itself, whose changelog is a long list of dependabot bumps across three different subdirectories, which suggests the work between releases was maintenance rather than feature work. There are 101 open issues.
The license is MIT per the repository metadata, and the license file at the root is spelled `LICENCE`. There is a `CONTRIBUTING.md` and a `CODE_OF_CONDUCT.md`, and a `performance-test.js` at the root that is not wired into the yarn scripts in `package.json`, so it is a tool you run by hand.
Editorial conclusion
Danfo.js is a real implementation rather than a naming exercise: the install layout, the separate browser and Node packages, and the plotting chain that goes straight from a CSV read to a rendered chart are all there. The pandas-shaped API is the point, and if you already know pandas you will be productive in an hour. The signs of strain are equally concrete. The badges resolve to opensource9ja/danfojs while the code lives in javascriptdata, the default branch is `dev` while CI runs on `master`, and the CDN instructions still pin 1.1.2 against a 1.2.0 release. For a browser dataframe library, start by reading the version you are actually about to install.
Frequently asked questions
Is there a pandas library for JavaScript?
Danfo.js is the direct answer: it is a JavaScript library built around pandas' dataframe model, with the same method names for selection, grouping, merging and IO, so the concepts transfer. It also ships its own plotting layer and can convert frames to TensorFlow.js tensors, which pandas users reach for through numpy instead.
Which package do I install for Node versus the browser?
Node applications install `danfojs-node`. Frameworks like React, Vue and Next.js install `danfojs`. A plain HTML page with no build step uses a JsDelivr script tag pointing at `[email protected]/lib/bundle.js`, though that tag is pinned a minor version behind the current 1.2.0 release.
How do you plot a DataFrame in Danfo.js?
Call `.plot()` with the id of a DOM element, then pick the chart on the returned object: `.box()`, `.table()` or `.line()`. A `config` object passed to the chart method controls things like which columns to draw. The examples do this directly on the result of `readCSV`, without an intermediate step.
What is the difference between a DataFrame and a Series in Danfo.js?
A DataFrame is the two-dimensional labelled structure you construct from a CSV, JSON, array, object or tensor, and a Series is a single labelled column. Most of the API, including `describe`, `plot`, `query` and the scalers, exists on both, while DataFrame-only methods such as `merge` and `setIndex` operate across columns.
How current is the Danfo.js release line?
The newest tag is v1.2.0, published on 2025-04-03, and the last push to the repository was on 2026-04-15. Most of the work listed in the v1.2.0 notes is dependency bumps rather than new features, so expect the API surface described in the README to be accurate but expect dependency-level surprises.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/javascriptdata-danfojs)