py-organ
py-organ copied to clipboard
Add organized rollup output
csvorganize
should be able to produce a stats (or index) CSV that lists the unique keys and their row counts, e.g.:
$ echo "foo,bar\na,1\na,2\nb,3" > test.csv
$ csvorganize --key "{foo}" --stats foo-stats.csv
$ cat foo-stats.csv
key,count
a,2
b,1
Or should we just produce this on stdout, and print the other stuff to stderr?
Should we get more sophisticated and allow other rollups? Statistics for a single column (min, max, median, standard deviation)?