JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q24761F
  • License MIT

Node project to have data manipulation and analysis, parallel to pandas

Package Exports

  • js-neutron-frame
  • js-neutron-frame/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (js-neutron-frame) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

LinkedIn

Table of Contents
    <<<<<<< Updated upstream
  1. About The Project
  2. Getting Started
  3. Documentation and Examples
  4. =======
  5. About The Project
  6. Getting Started
  7. Usage
  8. >>>>>>> Stashed changes
  9. Contributing
  10. License
  11. Contact
  12. Acknowledgments

<<<<<<< Updated upstream

About The Project

"js-neutron-frame" is a powerful library written in TypeScript designed to provide data manipulation and statistical analysis capabilities, akin to Python's Pandas library, but tailored specifically for JavaScript/TypeScript and Node.js applications. The library offers a flexible and efficient way to work with tabular data, enabling developers to perform data transformations, statistical calculations, and more, all within the JavaScript ecosystem.

Key Features:

Data Manipulation: With "js-neutron-frame", you can effortlessly work with data in tabular format, treating it like a spreadsheet. The library supports adding, updating, and deleting rows and columns, making data manipulation a breeze.

Statistical Analysis: "js-neutron-frame" comes equipped with a rich set of statistical functions. Perform operations such as calculating mean, median, mode, and standard deviation on columns or the entire DataFrame, gaining valuable insights from your data.

Data Import and Export: Easily import data from CSV and Excel files, ensuring seamless integration with your existing datasets. The library empowers you to export results and processed data back to various file formats with ease.

Dynamic Column Handling: When using the addRow function, "DataFrame.js" dynamically adjusts columns based on the provided data. New columns are automatically created if the keys in the provided row data do not exist in the current columns.

Flexible and Lightweight: Built with modern JavaScript, "DataFrame.js" offers a lightweight and versatile solution for data analysis. It is optimized for speed and memory efficiency, making it suitable for both small and large datasets.

Easy Integration: As an npm module, "DataFrame.js" is readily available for integration into any JavaScript or Node.js project. Simply install the package and start harnessing its data manipulation capabilities right away.

About The Project

There are many great README templates available on GitHub; however, I didn't find one that really suited my needs so I created this enhanced one. I want to create a README template so amazing that it'll be the last one you ever need -- I think this is it.

Here's why:

  • Your time should be focused on creating something amazing. A project that solves a problem and helps others
  • You shouldn't be doing the same tasks over and over like creating a README from scratch
  • You should implement DRY principles to the rest of your life 😄

Of course, no one template will serve all projects since your needs may be different. So I'll be adding more in the near future. You may also suggest changes by forking this repo and creating a pull request or opening an issue. Thanks to all the people have contributed to expanding this template!

Stashed changes

(back to top)

<<<<<<< Updated upstream

Getting Started

This is walkthrough of how the library can be installed/

Prerequisites and Installation

  1. Install Node.js and npm
  2. For TypeScript projects, install TypeScript [This step is not required for JavaScript projects]
npm install typescript --save-dev
  1. Install the library from npm modules:
npm install js-neutron-frame

(back to top)

Documentation and Examples

import the library

import { DataFrame, readCSV } from "js-neutron-frame";

Create DataFrame

  1. Create an empty DataFrame:
const df = new DataFrame();

  1. Create DataFrame by reading from .csv file:
const df = await readCSV('./oscar_age_male.csv');

DataFrame utilities

  1. addRows(DataFrameRow): void The keys refer to the columns If a key is new, it is added to the columns
df.addRow({Index:1, Year: 1928, Age:44, Name:'Emil Jannings', Movie: 'The Last Command'});
df.addRow({Index:2, Year: 1929, Age:41, Name:'Warner Baxter', Movie: 'The Old Arizona'});
df.addRow({Index:3, Year: 1930, Age:62, Name:'George Arliss', Movie: 'Disraeli'});
df.addRow({Index:4, Year: 1931, Age:53, Name:'Lionel Barrymore', Movie: 'A Free Soul'});

  1. addColumns(name: string, values: (number | string | boolean)[]): void
const BoxOffice = [50000, 60000, 75000];
df.addColumn('BoxOffice', salaryData);

  1. getShape(): [row_size, column_size] returns the [rows, columns] of the DataFrame
df.getShape();

Output: [ 89, 5 ]


  1. filterByColums(columnName: string, value: number | string | boolean): DataFrameRow[] Takes columnName and the value that has to be matched as input. This does simple plain matching and returns the filtered rows.
df.filterByColumn('Age', 44)

Output:

[
  {
    Index: 1,
    Year: 1928,
    Age: 44,
    Name: 'Emil Jannings',
    Movie: 'The Last Command'
  },
  {
    Index: 87,
    Year: 2014,
    Age: 44,
    Name: 'Matthew McConaughey',
    Movie: 'Dallas Buyers Club'
  }
]

  1. showFirstRows(n: number = 5): DataFrameRow[] Shows n rows from beggining. Default 5 rows are shown if not specified.
const firstRows = df.showFirstRows(3);

Output:

[
  {
    Index: 1,
    Year: 1928,
    Age: 44,
    Name: 'Emil Jannings',
    Movie: 'The Last Command'
  },
  {
    Index: 2,
    Year: 1929,
    Age: 41,
    Name: 'Warner Baxter',
    Movie: 'In Old Arizona'
  },
  {
    Index: 3,
    Year: 1930,
    Age: 62,
    Name: 'George Arliss',
    Movie: 'Disraeli'
  }
]

  1. showLastRows(n: number = 5): DataFrameRow[] Shows n rows from last. Default 5 rows are shown if not specified.
const lastRows = df.showLastRows(2)

Output:

[
  {
    Index: 3,
    Year: 1930,
    Age: 62,
    Name: 'George Arliss',
    Movie: 'Disraeli'
  },
  {
    Index: 4,
    Year: 1931,
    Age: 53,
    Name: 'Lionel Barrymore',
    Movie: 'A Free Soul'
  }
]

  1. getColumnDataTypes(): { [key: string]: string } returns the data types of the columns based on their values
df.getColumnDataTypes();

Output:

{
  Index: 'number',
  Year: 'number',
  Age: 'number',
  Name: 'string',
  Movie: 'string'
}

Statistical Opeartions on the Data

For more examples, please refer to the google doc Documentation

Getting Started

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

Prerequisites

This is an example of how to list things you need to use the software and how to install them.

  • npm
    npm install npm@latest -g

Installation

Below is an example of how you can instruct your audience on installing and setting up your app. This template doesn't rely on any external dependencies or services.

  1. Get a free API Key at https://example.com
  2. Clone the repo
    git clone https://github.com/your_username_/Project-Name.git
  3. Install NPM packages
    npm install
  4. Enter your API in config.js
    const API_KEY = 'ENTER YOUR API';

(back to top)

Usage

Use this space to show useful examples of how a project can be used. Additional screenshots, code examples and demos work well in this space. You may also link to more resources.

For more examples, please refer to the Documentation

Stashed changes

(back to top)

<<<<<<< Updated upstream ### Contributing

Contributing

Stashed changes

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

<<<<<<< Updated upstream ### License

License

Stashed changes

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

<<<<<<< Updated upstream

Contact

Krishna Rao - @KrishnaRaoBV - krishnaatt1999@gmail.com

Project Link: https://github.com/krishnaatt/js-neutron-frame

Contact

Krishna Rao - @your_twitter - krishnaatt1999@gmail.com

Project Link: https://github.com/your_username/repo_name

Stashed changes

(back to top)

<<<<<<< Updated upstream ### Acknowledgments

Acknowledgments

Stashed changes

Use this space to list resources you find helpful and would like to give credit to. I've included a few of my favorites to kick things off!

(back to top)

<<<<<<< Updated upstream linkedin-url: https://www.linkedin.com/in/krishna-rao-baa0b619b/

Stashed changes