csv_select.py - select rows from a table¶
- Tags
Python
Purpose¶
extract rows from a csv-formatted table.
The select statement is a one-line, for example:
csv_select.py "int(r['mC-foetal-sal-R4']) > 0" < in > out
Note the required variable name r for denoting field names. Please also be aware than numeric values need to be converted first before testing.
Usage¶
Type:
python csv_select.py --help
for command line help.
Command line options¶
usage: csv-select [-h] [-r] [-u] [-l] [-f FILENAME_FIELDS]
[--timeit TIMEIT_FILE] [--timeit-name TIMEIT_NAME]
[--timeit-header] [--random-seed RANDOM_SEED] [-v LOGLEVEL]
[--log-config-filename LOG_CONFIG_FILENAME]
[--tracing {function}] [-? ?] [--csv-dialect CSV_DIALECT]
[-I STDIN] [-L STDLOG] [-E STDERR] [-S STDOUT]
csv-select: error: argument -?: expected one argument