https://github.com/faradayio/fdy-dendrite
A command-line tool to disaggregate rows in a csv
https://github.com/faradayio/fdy-dendrite
Last synced: 28 days ago
JSON representation
A command-line tool to disaggregate rows in a csv
- Host: GitHub
- URL: https://github.com/faradayio/fdy-dendrite
- Owner: faradayio
- License: mit
- Created: 2018-04-02T20:29:30.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-03T14:51:58.000Z (about 8 years ago)
- Last Synced: 2025-03-22T03:41:56.347Z (about 1 year ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Dendrite
A command-line tool to disaggregate rows in a csv by a "AND"-delimited field
#### What we have
```CSV
name,address,date
Naomi and Bob,123 Main St,2018-03-01
Ethan,22 Maple St,2017-12-05
"John,Sybil",22 Oak Ln,2016-2-21
```
#### What we want:
```CSV
name,address,date
Naomi,123 Main St,2018-03-01
Bob,123 Main St,2018-03-01
Ethan,22 Maple St,2017-12-05
John,22 Oak Ln,2016-2-21
Sybil,22 Oak Ln,2016-2-21
```
Note that Dendrite will disaggregate rows on standard "AND" separators found in the target field. These include `&`, `and`, and `,`.
## Install
`npm install -g fdy-dendrite`
## Usage
`dendrite -i -f -o `
## Arguments
* `-i, --input` (_REQUIRED_) Input filename and path (e.g. '/home/ubuntu/inputfile.csv')
* `-f, --field` (_REQUIRED_) Name of delimited field on which to duplicate rows (e.g. `name`)
* `-o, --output` (_OPTIONAL_) Output filename and path. Default is the input filename with 'out_' prepended.