All Projects → opensource9ja → Danfojs

opensource9ja / Danfojs

Licence: mit
danfo.js is an open source, JavaScript library providing high performance, intuitive, and easy to use data structures for manipulating and processing structured data.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Danfojs

Datasheets
Read data from, write data to, and modify the formatting of Google Sheets
Stars: ✭ 593 (-54.52%)
Mutual labels:  dataframe, data-science, pandas, data-analytics
Dataframe
C++ DataFrame for statistical, Financial, and ML analysis -- in modern C++ using native types, continuous memory storage, and no pointers are involved
Stars: ✭ 828 (-36.5%)
Mutual labels:  dataframe, data-science, pandas
Boltzmannclean
Fill missing values in Pandas DataFrames using Restricted Boltzmann Machines
Stars: ✭ 23 (-98.24%)
Mutual labels:  dataframe, data-science, pandas
Foxcross
AsyncIO serving for data science models
Stars: ✭ 18 (-98.62%)
Mutual labels:  dataframe, data-science, pandas
Gspread Pandas
A package to easily open an instance of a Google spreadsheet and interact with worksheets through Pandas DataFrames.
Stars: ✭ 226 (-82.67%)
Mutual labels:  data-science, pandas, data-analytics
Koalas
Koalas: pandas API on Apache Spark
Stars: ✭ 3,044 (+133.44%)
Mutual labels:  dataframe, data-science, pandas
Pandasvault
Advanced Pandas Vault — Utilities, Functions and Snippets (by @firmai).
Stars: ✭ 316 (-75.77%)
Mutual labels:  dataframe, data-science, pandas
Dataframe Go
DataFrames for Go: For statistics, machine-learning, and data manipulation/exploration
Stars: ✭ 487 (-62.65%)
Mutual labels:  dataframe, data-science, pandas
Pdpipe
Easy pipelines for pandas DataFrames.
Stars: ✭ 590 (-54.75%)
Mutual labels:  dataframe, data-science, pandas
Lux
Python API for Intelligent Visual Data Discovery
Stars: ✭ 787 (-39.65%)
Mutual labels:  data-science, pandas
Python Introducing Pandas
Introduction to pandas Treehouse course
Stars: ✭ 24 (-98.16%)
Mutual labels:  data-science, pandas
Pymc Example Project
Example PyMC3 project for performing Bayesian data analysis using a probabilistic programming approach to machine learning.
Stars: ✭ 90 (-93.1%)
Mutual labels:  data-science, pandas
Python for ml
brief introduction to Python for machine learning
Stars: ✭ 29 (-97.78%)
Mutual labels:  data-science, pandas
Modin
Modin: Speed up your Pandas workflows by changing a single line of code
Stars: ✭ 6,639 (+409.13%)
Mutual labels:  dataframe, pandas
Just Pandas Things
An ongoing list of pandas quirks
Stars: ✭ 660 (-49.39%)
Mutual labels:  data-science, pandas
Pandas Profiling
Create HTML profiling reports from pandas DataFrame objects
Stars: ✭ 8,329 (+538.73%)
Mutual labels:  data-science, pandas
Mlcourse.ai
Open Machine Learning Course
Stars: ✭ 7,963 (+510.66%)
Mutual labels:  data-science, pandas
Crime Analysis
Association Rule Mining from Spatial Data for Crime Analysis
Stars: ✭ 20 (-98.47%)
Mutual labels:  data-science, pandas
10 Simple Hacks To Speed Up Your Data Analysis In Python
Some useful Tips and Tricks to speed up the data analysis process in Python.
Stars: ✭ 45 (-96.55%)
Mutual labels:  data-science, pandas
Pandas Ta
Technical Analysis Indicators - Pandas TA is an easy to use Python 3 Pandas Extension with 130+ Indicators
Stars: ✭ 962 (-26.23%)
Mutual labels:  dataframe, pandas


Danfojs: powerful javascript data analysis toolkit

Node.js CI Coverage Status Twitter Patreon donate button

What is it?

Danfo.js 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.

Main Features

  • 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 Series, DataFrame, 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, Json, Excel, Data package).
  • 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

To use Danfo.js via script tags, copy and paste the CDN below to the body of your HTML file

    <script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/bundle.min.js"></script> 

Example Usage in the Browser

See the example below in Code Sandbox

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://cdn.plot.ly/plotly-1.2.0.min.js"></script> 
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/bundle.min.js"></script> 

    <title>Document</title>
</head>

<body>

    <div id="div1"></div>
    <div id="div2"></div>
    <div id="div3"></div>

    <script>

        dfd.read_csv("https://raw.githubusercontent.com/plotly/datasets/master/finance-charts-apple.csv")
            .then(df => {

                df['AAPL.Open'].plot("div1").box() //makes a box plot

                df.plot("div2").table() //display csv as table

                new_df = df.set_index({ key: "Date" }) //resets the index to Date column
                new_df.plot("div3").line({ columns: ["AAPL.Open", "AAPL.High"] })  //makes a timeseries plot

            }).catch(err => {
                console.log(err);
            })

    </script>
    
</body>

</html>

Output in Browser:

How to install

Danfo.js is hosted on NPM, and can installed via package managers like npm and yarn

npm install danfojs-node

Example usage in Nodejs

const dfd = require("danfojs-node")


dfd.read_csv("https://web.stanford.edu/class/archive/cs/cs109/cs109.1166/stuff/titanic.csv")
  .then(df => {
    //prints the first five columns
    df.head().print()

    //Calculate descriptive statistics for all numerical columns
    df.describe().print()

    //prints the shape of the data
    console.log(df.shape);

    //prints all column names
    console.log(df.column_names);

    //prints the inferred dtypes of each column
    df.ctypes.print()

    //selecting a column by subsetting
    df['Name'].print()

    //drop columns by names
    cols_2_remove = ['Age', 'Pclass']
    df_drop = df.drop({ columns: cols_2_remove, axis: 1 })
    df_drop.print()


    //select columns by dtypes
    let str_cols = df_drop.select_dtypes(["string"])
    let num_cols = df_drop.select_dtypes(["int32", "float32"])
    str_cols.print()
    num_cols.print()


    //add new column to Dataframe
    let new_vals = df['Fare'].round().values
    df_drop.addColumn({ column: "fare_round", value:  new_vals})
    df_drop.print()

    df_drop['fare_round'].print(5)

    //prints the number of occurence each value in the column
    df_drop['Survived'].value_counts().print()

    //print the last ten elementa of a DataFrame
    df_drop.tail(10).print()

    //prints the number of missing values in a DataFrame
    df_drop.isna().sum().print()

  }).catch(err => {
    console.log(err);
  })

Output in Node Console:

If you want to use Danfo in frontend frameworks like React/Vue, read this guide

You can play with Danfo.js on Dnotebooks playground here

See the Official Getting Started Guide

Documentation

The official documentation can be found here

Discussion and Development

Development discussions take place here.

Contributing to Danfo

All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome. A detailed overview on how to contribute can be found in the contributing guide.

Licence MIT

Created by Rising Odegua and Stephen Oni

Danfo.js - Open Source JavaScript library for manipulating data. | Product Hunt Embed

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].