Danfo.js – Is it alternative of Python Pandas?

0

Danfo.js – Is it alternative of Python Pandas?

Data science is an upcoming need of markets. Python and R language are suitable for analysis and data science. If you’re a JS developer and want to touch this line. Then this tutorial is for you.

What is DanfoJS?

One minute, if you’ve Python pandas knowledge then this article will be beneficial for you too. DanfoJS is a powerful javascript data analysis toolkit. It is an open source, JavaScript library providing high performance, intuitive, and easy to use data structures for manipulating and processing structured data.

danfo.js analysis framework
Danfo.js – Is it alternative of Python Pandas?

In addition, it is a javascript package that provides fast, flexible. And expressive data structures designed to make working with “relational” or “labeled” data both easy and intuitive. It is heavily inspired by Pandas library, and provides a similar API. This means that users familiar with Pandas, can easily pick up danfo.js.

What you can do with DanfoJS?

  • Danfo.js is fast. It is built on Tensorflow.js, and supports tensors out of the box. This means you can convert Danfo data structure to Tensors.
  • Easy handling of missing-data (represented as NaN) in floating point as well as non-floating-point data
  • Size mutability: columns can be inserted/deleted from DataFrame
  • Automatic and explicit alignment: objects can be explicitly aligned to a set of labels, or the user can simply ignore the labels and let SeriesDataFrame, etc. automatically align the data for you in computations
  • Powerful, flexible groupby functionality to perform split-apply-combine operations on data sets, for both aggregating and transforming data
  • Make it easy to convert Arrays, JSONs, List or Objects, Tensors and differently-indexed data structures into DataFrame objects
  • Intelligent label-based slicing, fancy indexing, and querying of large data sets
  • Intuitive merging and joining data sets
  • Robust IO tools for loading data from flat-files (CSV and delimited).
  • Powerful, flexible and intutive API for plotting DataFrames and Series interactively.
  • Timeseries-specific functionality: date range generation and date and time properties.
  • Robust data preprocessing functions like OneHotEncoders, LabelEncoders, and scalers like StandardScaler and MinMaxScaler are supported on DataFrame and Series.

Installation

There are two ways to get danfo.js. We built an optimized and fast version for node.js and its available under the danfojs-node namespace. To install it via npm, you can do the following:


You can also install and use it in the browsers by using the CDN below:


Implementation

DanfoJS can be run with Node or without NodeJS. So firstly take a small look of HTML based code.

Output:


Example with Node.js


Syntax is similar of Python pandas. You can easily do most of work which you can do with Pandas.

See the documentation for more.

0
Summary
Review Date
Reviewed Item
Danfo.js - Is it alternative of Python Pandas
Author Rating
41star1star1star1stargray
Software Name
Danfo.js
Software Name
Any
Software Category
Javascript, Typescript