https://github.com/oandregal/sum-csv
Utility that helps you to sum CSV file columns
https://github.com/oandregal/sum-csv
csv
Last synced: 3 months ago
JSON representation
Utility that helps you to sum CSV file columns
- Host: GitHub
- URL: https://github.com/oandregal/sum-csv
- Owner: oandregal
- Created: 2017-02-17T19:12:37.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-17T19:13:18.000Z (about 9 years ago)
- Last Synced: 2025-01-19T13:19:19.436Z (about 1 year ago)
- Topics: csv
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Sum CSV columns
This utility take a CSV file like:
column1,column2,column3,column4,column5
2017-02-07,1,2,3,'foo'
2017-02-08,5,6,7,'bar'
2017-02-09,1,0,1,'foobar'
2017-02-10,9,0,0,'barfoo'
an outputs the sum of its columns, ordered by count:
16, column2
11, column4
8, column3
# How to use it
Install it as a global module:
npm install -g sum-csv
Use it UNIX-like:
cat demo.csv | sum-csv --ignore-columns column1,column5
Or as a regular script:
sum-csv --ignore-columns column1,column5 demo.csv
# Options
`--ignore-columns cols` or `-i cols`:
* Allows you to pass a list of columns to ignore, separated by commas.