csv_cut.py - select columns from a table¶
- Tags
Python
Purpose¶
extract named columns from a csv formatted table
Todo
describe purpose of the script.
Usage¶
Extract the two columns gene and length from a table in standard input:
python csv_cut.py gene length < stdin
The script permits the use of patterns. For example, the command will select the column gene and all columns that contain the part ‘len’:
python csv_cut.py gene %len% < stdin
Type:
python csv_cut.py --help
for command line help.
Command line options¶
usage: csv-cut [-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-cut: error: argument -?: expected one argument