Skip to content

Commit

Permalink
Flesh out csvstat sample commands.
Browse files Browse the repository at this point in the history
  • Loading branch information
onyxfish committed Dec 26, 2011
1 parent d8f9520 commit a8567bb
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/scripts/csvcut.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,4 @@ Extract the first and third columns::
Extract columns named "TOTAL" and "State Name" (in that order)::

$ csvcut -c TOTAL,"State Name" examples/realdata/FY09_EDU_Recipients_by_State.csv

1 change: 1 addition & 0 deletions docs/scripts/csvjoin.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,4 @@ Examples
========

Join examples coming soon...

15 changes: 14 additions & 1 deletion docs/scripts/csvstat.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,20 @@ When an statistic name is passed, only that stat will be printed::

$ csvstat --freq examples/realdata/FY09_EDU_Recipients_by_State.csv

1. State Name: None
2. State Abbreviate: None
3. Code: None
4. Montgomery GI Bill-Active Duty: 3548.0
5. Montgomery GI Bill- Selective Reserve: 1019.0
6. Dependents' Educational Assistance: 1261.0
7. Reserve Educational Assistance Program: 715.0
8. Post-Vietnam Era Veteran's Educational Assistance Program: 6.0
9. TOTAL: 6520.0
10. _unnamed: None
If a single stat *and* a single column are requested, only a value will be returned::

$ csvstat -c 3 --freq examples/realdata/FY09_EDU_Recipients_by_State.csv
$ csvstat -c 4 --freq examples/realdata/FY09_EDU_Recipients_by_State.csv

3548.0

0 comments on commit a8567bb

Please sign in to comment.