CSVfox
Leverage Your Data.
 English

±delete

Prevents one or more CSV columns from output

Description

This command ignores columns when reading (when input) or deletes them from output (when writing).
The most simple case is deleting just one unwanted field.
But you can also enter a list of fields to delete. In this case, it will is a comma-separated list of CSV column names (or numbers), and can even include column ranges denoted with a hyphen.
After the delete command, the respective column(s) are no longer accessible for subsequent commands.

Pattern

±delete[Fieldname] ±delete=[Fieldname] ±delete[AField],[AnotherField],... ±delete=[AField],[FirstOfMoreFields]-[LastOfMoreFields],...

Usage examples

This is the input file names.csv.
names.csv
CityFirstNameLastNameBirthDriver License
RomeAndreaBocelli1958y
Los AngelesLieutnantColumbo1927y
LondonHerculePoirot1910-
New YorkTheodorosKojak1922y
csvfox names.csv -delete[FirstName] lastnames.csv
This removes the column FirstName. The resulting CSV table is written to lastnames.csv.
lastnames.csv
CityLastNameBirthDriver License
RomeBocelli1958y
Los AngelesColumbo1927y
LondonPoirot1910-
New YorkKojak1922y
csvfox names.csv -delete[3],[4] firstnames.csv
This command removes the third and fourth column (LastName and Birth).
firstnames.csv
CityFirstNameDriver License
RomeAndreay
Los AngelesLieutnanty
LondonHercule-
New YorkTheodorosy
csvfox names.csv -delete[FirstName]-[Birth] nonames.csv
This command removess a range of three columns (FirstName, LastName, and Birth).
nonames.csv
CityDriver License
Romey
Los Angelesy
London-
New Yorky

Hint

This command is meant for removing one or a few CSV columns.
If you want to rearrange column output completely, or just write only a few of many columns, consider using ±columns instead.
 

Under construction, coming soon