NAME
App::csvtool::Summarizing - summarize tabular data in csvtool
COMMANDS
count
$ csvtool count -fFIELD INPUT...
Counts the number of rows that have distinct values for the selected field.
Outputs a new table having only two columns. The first column will be the distinct values of the selected field that were found in the input, the second column will be an integer giving the number of rows of the input which had that that value. Rows are output in order of the first time each distinct value was seen in the input.
Besides the selected key field, all other fields of the input are ignored.
--field, -f
The field index to use as the counting key (defaults to 1).
sum
$ csvtool sum -fFIELD INPUT...
Sums the values in a given column, outputting a total at the end. Optionally, rows can be grouped together by one or more group-key fields, maintaining separate totals per unique set of values in those fields.
Outputs a new table with a row per set of keys. Each row will contain all of the key values, in the order given by the list of key fields, followed by its group total. If there are no key fields the output will be a single row containing just a single value.
--field, -f
The field index of the column to sum (defaults to 1).
--group, -g
Optional comma-separated list of additional fields to use as group keys. Defaults to empty, meaning that no key-based grouping will occur.
AUTHOR
Paul Evans <leonerd@leonerd.org.uk>