csvcolumnremover
A simple csv column remover written in Go.
Installation
go install github.com/csaldiasdev/csvcolumnremover@latest
This places the csvcolumnremover binary in $(go env GOBIN) (or $(go env GOPATH)/bin). Make sure that directory is on your PATH.
Build from source
git clone https://github.com/csaldiasdev/csvcolumnremover.git
cd csvcolumnremover
go build
Usage
csvcolumnremover -input <file> -column <name|index> [-output <file>]
Flags
-input — path to the input CSV file (required)
-column — column to remove: header name, or 0-based index prefixed with # (required)
-output — path to the output CSV file (defaults to stdout)
Examples
Remove the age column by name and print to stdout:
csvcolumnremover -input people.csv -column age
Remove the first column by index and write to a file:
csvcolumnremover -input people.csv -column '#0' -output trimmed.csv