The CSV Explorer is a command-line utility written in Go for dealing with CSV files. Anyone who deals with data munging will know the importance of inspecting data files for consistency, and this is a tool that can help.
$ go get github.com/wyc/csvxp
$ go install github.com/wyc/csvxp
Please refer to this CSV data set in file.csv
for the examples below:
Header1,Header2,Header3
a,b,c
1,2,3
Column headers of a CSV file
$ csvxp -column-headers file.csv
Header1
Header2
Header3
Values of a single column
$ csvxp -column-name "Header1" file.csv
a
1
$ csvxp -column-name "Header3" file.csv
c
3
Values of multiple columns
$ csvxp -column-names "Header1","Header3" file.csv
a,c
1,3
Calculating title min mean max
column value length statistics across all rows:
$ csvxp -column-stats file.csv
"Header1" 1 1 1
"Header2" 1 1 1
"Header3" 1 1 1