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).
Metadata
Release files for snip-tsv 0.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| snip-tsv-0.5.1.tar.gz | 6.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| snip_tsv-0.5.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.0 kB
Release files / snip-tsv-0.5.1.tar.gz
| Download URL | snip-tsv-0.5.1.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
921a238206309e2a5527414ab99dea9169692b02fc7910bfc496f414d348c381
|
|
BLAKE2b-256 checksum How to use checksums |
930233a5b69675fb7dd3652501f993835118932dd8ffa6dff248137e8c783932
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.12 CPython/3.10.2 Linux/5.13.0-1014-azure
|
Release files / snip_tsv-0.5.1-py3-none-any.whl
| Download URL | snip_tsv-0.5.1-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
15f1edc84ca41430120f23227535816d85d51a025c3af179a09fecd3d6a2e1f0
|
|
BLAKE2b-256 checksum How to use checksums |
d62172de94c29fa0e607af1f47afcb18f2f825b99e017f18fbe0a3d957d0042a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.12 CPython/3.10.2 Linux/5.13.0-1014-azure
|