🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

csv-do

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

csv-do

Command line utilities for CSV based on NodeJS. Split, Group, Aggregate, Mix, Merge csv files.

0.3.5
latest
Source
npm
Version published
Weekly downloads
3
-85.71%
Maintainers
1
Weekly downloads
 
Created
Source

csv-do

Command line utilities for CSV based on NodeJS. Split, Group, Aggregate, Mix, Merge csv files.

Install

npm i csv-do -g

How to Use

csv-do is a command line utility that provides the following commands:

  • split: You provide an --input-file and a --column number that has values to group content by and splits one csv file into different files based on the content of that column.
#split myfile.csv by the content of the 2nd column. Drop the files in folder ./split
csv-do split --input-file ./myfile.csv --columns 2 --output-folder ./split/

#split myfile.csv by the content of the 2nd and 5th columns combined. Drop the files in folder ./split
csv-do split --input-file ./myfile.csv --columns 2,5 --output-folder ./split/

#split myfile.csv in files of 100 rows maximum. Drop the files in folder ./split
csv-do split --input-file myfile.csv --chunk-size 100 --output-folder ./split/
  • compare: You provide two file paths (--file1 and --file2) and the system will highlight differences between the two files in records found by those columns.
#compare file1.csv against file2.csv row by row.
csv-do compare --file1 ./file1.csv --file2 ./file2.csv

#compare file1b.csv against file2.csv row by row.
csv-do compare --file1 ./file1b.csv --file2 ./file2.csv

#compare file1c.csv against file2.csv by finding rows in file2.csv that match those in file1c.csv by the columns specified in --search-columns parameter.
csv-do compare --file1 ./file1b.csv --file2 ./file2.csv --search-columns \"5,16,20\"

Keywords

CSV

FAQs

Package last updated on 09 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts