theshdb-data-ops

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.

Generated using TypeDoc