pandas-js

WebJar for pandas-js

Лицензия

Лицензия

MIT
Категории

Категории

JavaScript Языки программирования
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

pandas-js
Последняя версия

Последняя версия

0.2.4
Дата

Дата

Тип

Тип

jar
Описание

Описание

pandas-js
WebJar for pandas-js
Ссылка на сайт

Ссылка на сайт

https://www.webjars.org
Система контроля версий

Система контроля версий

https://github.com/StratoDem/pandas-js

Скачать pandas-js

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/pandas-js/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>pandas-js</artifactId>
    <version>0.2.4</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/pandas-js/
implementation 'org.webjars.npm:pandas-js:0.2.4'
// https://jarcasting.com/artifacts/org.webjars.npm/pandas-js/
implementation ("org.webjars.npm:pandas-js:0.2.4")
'org.webjars.npm:pandas-js:jar:0.2.4'
<dependency org="org.webjars.npm" name="pandas-js" rev="0.2.4">
  <artifact name="pandas-js" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='pandas-js', version='0.2.4')
)
libraryDependencies += "org.webjars.npm" % "pandas-js" % "0.2.4"
[org.webjars.npm/pandas-js "0.2.4"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.webjars.npm : immutable jar [3.8.1,4)

Модули Проекта

Данный проект не имеет модулей.

pandas-js

Pandas for JavaScript

pandas.js is an open source (experimental) library mimicking the Python pandas library. It relies on Immutable.js as the NumPy base. The main data objects in pandas.js are the Series and the DataFrame

Documentation

See the docs
See also this post on use for optimizing React logic.

Installation and use

$ npm install pandas-js

Importing Series and DataFrame

import { Series, DataFrame } from 'pandas-js';

Create a new Series

const ds = new Series([1, 2, 3, 4], {name: 'My test name', index: [2, 3, 4, 5]})
ds.toString()
// Returns:
// 2  1
// 3  2
// 4  3
// 5  4
// Name: My test name, dtype: dtype(int)

Filter a Series

const ds = new Series([1, 2, 3]);

// Returns Series([2, 3]);
ds.filter(ds.gte(2));

Filtering can be done with generic methods

const ds = new Series([1, 2, 3], {name: 'Test name'})

// Returns Series([true, false, false])
ds.eq(1);

// Returns Series([false, true, true])
ds.eq(new Series([0, 2, 3]));

// Returns Series([false, true, true])
ds.eq(Immutable.List([0, 2, 3]));

// Returns Series([false, true, true])
ds.eq([0, 2, 3]);

// Returns Series([2, 3])
ds.filter(ds.eq([0, 2, 3]));

Create a new DataFrame

const df = new DataFrame([{x: 1, y: 2}, {x: 2, y: 3}, {x: 3, y: 4}])

// Returns:
//    x  |  y
// 0  1  |  2
// 1  2  |  3
// 2  3  |  4
df.toString();

Filtering a DataFrame

const df = new DataFrame(Immutable.Map({x: new Series([1, 2]), y: new Series([2, 3])}));

// Returns DataFrame(Immutable.Map({x: Series([2]), y: Series([3]));
df.filter(df.get('x').gt(1));

// Returns DataFrame(Immutable.Map({x: Series([2]), y: Series([3]));
df.filter([false, true]);

// Returns DataFrame(Immutable.Map({x: Series([2]), y: Series([3]));
df.filter(Immutable.Map([false, true]));

Development

Testing and build

$ npm run test
$ npm run build

Testing uses Jest. Building requires the babel compiler.

org.webjars.npm

StratoDem Analytics

StratoDem Analytics is a technology firm helping clients deploy data science in real estate to drive smarter investment and development decisions

Версии библиотеки

Версия
0.2.4