Skip to content

a cli tool for transforming and working with csv files

License

Notifications You must be signed in to change notification settings

Raphico/csv-data-transformer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CSV Data Transformer

A Node.js CLI tool for transforming and processing large CSV files. Supports filtering, aggregating, and modifying CSV data efficiently using streams. Ideal for processing data in various formats, cleaning, and preparing it for further use.

Features

  • Filter rows based on column values.
  • Aggregate data (e.g., sum, average) by specific columns.
  • Add, remove, or rename columns.
  • Export to CSV or JSON formats.

Installation

  1. clone repository
git clone [email protected]:Raphico/csv-data-transformer.git
cd csv-data-transformer
  1. install dependencies
npm install
  1. create symlink
npm link

Usage

csvtransform --help

Commands

Command Description Example
--input <filePath> Specifies the CSV file to process. --input data.csv
--output <filePath> Specifies the output file path and format (.csv or .json). --output result.json
--filter <condition> Filters rows based on a condition (e.g., column=value). --filter "status=active", --filter "status=active OR country=USA", --filter "status=active AND country=USA
--aggregate <type,column> Aggregates data, e.g., sum, average on a column. --aggregate "sum,sales"
--add-column <columnName=defaultValue> Adds a new column with a default value. --add-column "discount=0"
--remove-column <columnName> Removes a specified column. --remove-column "old_column"
--rename-column <oldName=newName> Renames a column. --rename-column "old_col=new_col"
--delimiter <character> Specifies the CSV delimiter (default is a comma). --delimiter ";"

About

a cli tool for transforming and working with csv files

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published