Crop tabular data files
Project description
snip-tsv
Crop tabular data files
Installation
pip install snip-tsv
Usage
$ snip -h
usage: snip [-h] [-v] [-H] [-d DELIMITER] [-o OUT_FILE] [-x PLOT_X]
[-y PLOT_Y] [-s START] [-e END] [-c COL]
[-p PICK | -r OMIT]
in_file
positional arguments:
in_file Input data file. (default: -)
optional arguments:
-h, --help show this help message and exit
-v, --version show program's version number and exit
-H, --header When set assume the first row to be a
header row. By default, no header row is
assumed.
-d DELIMITER, --delimiter DELIMITER
The delimiter used in the input data file.
(default: '\t')
-o OUT_FILE, --out-file OUT_FILE
File to write the results to (either an
image or TSV file. If not provided, a
matplotlib plot is shown when plotting, and
data is written to stdout when cropping.
(default: -)
plot options:
-x PLOT_X, --plot-x PLOT_X
Column to use on the x-axis. A 0-indexed
integer or a column heading string.
(default: 0)
-y PLOT_Y, --plot-y PLOT_Y
Column to use on the y-axis. A 0-indexed
integer or a column heading string.
(default: 1)
crop options:
-s START, --start START
Start value to use for cropping
(inclusive). If the column is numeric then
the row with column entry closest to the
given value is used.
-e END, --end END End value to use for cropping (exclusive).
If the column is numeric then the row with
column entry closest to the given value is
used. To specify a numeric value relative
to --crop-start use the syntax ':<number>'.
Omit this flag to crop from --crop-start to
the end of the file.
-c COL, --col COL Column to search in for --crop-
start/--crop-end values. A 0-indexed
integer or a column heading string.
(default: 0)
-p PICK, --pick PICK Comma separated list of columns to keep. If
specified, only columns in this list will
appear in the generated output. Columns can
either be column heading strings or
0-indexed integers (intermixing is
allowed). By default all columns are
retained.
-r OMIT, --omit OMIT Comma separated list of columns to omit. If
specified, columns in this list will be
removed from the generated output. Columns
can either be column heading strings or
0-indexed integers (intermixing is
allowed).
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
snip-tsv-0.5.1.tar.gz
(6.4 kB
view details)
Built Distribution
File details
Details for the file snip-tsv-0.5.1.tar.gz
.
File metadata
- Download URL: snip-tsv-0.5.1.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.10.2 Linux/5.13.0-1014-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 921a238206309e2a5527414ab99dea9169692b02fc7910bfc496f414d348c381 |
|
MD5 | 473cf8231d319f0a156d71ba4bd8639d |
|
BLAKE2b-256 | 930233a5b69675fb7dd3652501f993835118932dd8ffa6dff248137e8c783932 |
File details
Details for the file snip_tsv-0.5.1-py3-none-any.whl
.
File metadata
- Download URL: snip_tsv-0.5.1-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.10.2 Linux/5.13.0-1014-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15f1edc84ca41430120f23227535816d85d51a025c3af179a09fecd3d6a2e1f0 |
|
MD5 | 119cfa3001af95edacf6adeac0b3cb48 |
|
BLAKE2b-256 | d62172de94c29fa0e607af1f47afcb18f2f825b99e017f18fbe0a3d957d0042a |