Command-line utility for filtering and sorting CSV files.
To install CsvPal, just add
csvpal.py to the PATH (or equivalent configuration).
The following example shows how to filter out two columns (foo and bar) from
infile.csv to a new file named
csvpal infile.csv outfile.csv foo bar
--sort option will sort the columns in
csvpal infile.csv outfile.csv foo bar --sort
A "keep file" can be used to specify which columns will be kept in the output file. Each line of the keep file defines a single column to keep. The following example uses the keep file
csvpal infile.csv outfile.csv --keepfile keepers.txt