Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nfcampos/dodos
Pandas-inspired transducer-based data wrangling library for js
https://github.com/nfcampos/dodos
Last synced: 10 days ago
JSON representation
Pandas-inspired transducer-based data wrangling library for js
- Host: GitHub
- URL: https://github.com/nfcampos/dodos
- Owner: nfcampos
- License: mit
- Created: 2016-02-29T11:03:34.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-10-03T17:18:56.000Z (about 8 years ago)
- Last Synced: 2024-12-12T09:14:43.186Z (13 days ago)
- Language: JavaScript
- Homepage:
- Size: 2.67 MB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Dodos
Pandas-inspired transducer-based data wrangling library for jsOn npm: https://www.npmjs.com/package/dodos
NOTE: This is very much a work in progress for now
```js
array = [
[1, 2, 3],
[3, 4, 5],
]index = ['columnA', 'columnB', 'columnC']
const dodo = new Dodo(array, index)
dodo.col('columnA').toArray() // [1, 3]
dodo.filterBy('columnB', b => b == 4).toArray() // [4]
dodo.col('columnA').sum() // 4
```
All methods return a new instance, leaving the original untouched.
All operations on the array are evaluated only when calling `.toArray()` or when calling a `.reduce()` method (eg. `.sum()`).For now, please refer to the tests for more usage examples.