theshdb-data-ops
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

npm version License: MIT

data-ops

Library similar to pandas for JavaScript

data-ops is an open source (experimental) library mimicking the Python pandas library. The main data objects in data-ops is the DataFrame

Documentation

See the docs

Installation and use

$ npm i theshdb-data-ops

Importing DataFrame

import { DataFrame } from 'theshdb-data-ops';

Create a new DataFrame

const df = new DataFrame({
        columns: ['Name', 'Age', 'Gender'],
        data: [
          ['Alice', 30, 'Female'],
          ['Bob', 25, 'Male'],
          ['Charlie', 40, 'Male'],
        ],
    });

df.toString();

//Returns:

// DataFrame
// Shape: (3,3)
//         Name                    Age                     Gender    

// 1       Alice                   30                      Female    
// 2       Bob                     25                      Male      
// 3       Charlie                 40                      Male  

Create a DataFrame from a CSV file

const df = DataFrame.fromCSV('data.csv');

Testing and build

$ npm run test
$ npm run build

Testing uses Jest.

Readme

Keywords

none

Package Sidebar

Install

npm i theshdb-data-ops

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

60.8 kB

Total Files

24

Last publish

Collaborators

  • the_shdb