JavaScript: Manipulating data like Pandas using Danfo.js, replit ver. 1

Last Updated on June 24, 2022 by shibatau

I. What is Danfo.js

An open-source, JavaScript library providing high-performance, intuitive, and easy-to-use data structures for
manipulating and processing structured data. It is heavily inspired by the Python’s Pandas
library and provides a similar interface and API. Moreover, Danfo.js is fast and It is built on
Tensorflow.js and supports tensors out of the box.

Intoduction To Danfo.js – Manipulating And Processing Data

I have also learned the Danfo.js basics here:

II. The scripts

The sample data is here:

Load the data from URL: paste the following codes on the HTML file,

<!DOCTYPE html>
<html lang="en">

    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <script src=""></script>


    <div id="plot_div"></div>

  dfd.readCSV( ""
    .then(df => {

    //prints the first five columns

    }).catch(err => {



If you use Replit, please paste the codes above on the index.html file and press the Run button. You will get the data frame on the bottom right corner like this:

About shibatau

I was born and grown up in Kyoto. I studied western philosophy at the University and specialized in analytic philosophy, especially Ludwig Wittgenstein at the postgraduate school. I'm interested in new technology, especially machine learning and have been learning R language for two years and began to learn Python last summer. Listening toParamore, Sia, Amazarashi and MIyuki Nakajima. Favorite movies I've recently seen: "FREEHELD". Favorite actors and actresses: Anthony Hopkins, Denzel Washington, Ellen Page, Meryl Streep, Mia Wasikowska and Robert DeNiro. Favorite books: Fyodor Mikhailovich Dostoyevsky, "The Karamazov Brothers", Shinran, "Lamentations of Divergences". Favorite phrase: Salvation by Faith. Twitter: @shibatau

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.