Skip to main content

A tool to drop or keep columns from a CSV file.

Project description

decol

Build Status

A tool to drop or keep columns from a CSV file.

Features

  • columns can be specified as 1-based integer indexes or column headers
  • multiple indexes or headers can be specified as a comma-separated list
  • negative indexes are supported
  • index ranges are also supported, e.g. 1:2 for the first two column

Usage

$ decol -h
Usage: decol [OPTIONS] INPUT OUTPUT

  A tool to drop or keep columns from a CSV file.

Options:
  -c, --columns COLUMNS       Comma-separated list of 1-based column indexes
                              to remove. Negative integers will index from the
                              end. May use a range, e.g. 1:2 or -3:-2 for
                              first and second of three columns. Ranges must
                              always be given in left to right column order
                              for both positive and negative indexes. Mutually
                              exclusive with --headers.
  -H, --headers HEADERS       Comma-separated list of columns to remove by
                              first-line header. Mutually exclusive with
                              --columns.
  -s, --sep SEPARATOR         Column separator.  [default: ,]
  -o, --output-sep SEPARATOR  Output column separator. [default: --sep value]
  --keep                      Keep only the specified columns in the order
                              specified in --columns or --headers.  [default:
                              False]
  --version                   Show the version and exit.
  -h, --help                  Show this message and exit.

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

decol-1.1.4.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

decol-1.1.4-py2.py3-none-any.whl (5.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file decol-1.1.4.tar.gz.

File metadata

  • Download URL: decol-1.1.4.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for decol-1.1.4.tar.gz
Algorithm Hash digest
SHA256 d4127e8aaacdff5714d16a4d564a4239a9337dc121751581ad958709912bf61d
MD5 52996147f16a4d44132d0786ead7e53c
BLAKE2b-256 0e2ad0ee64b1f0766055f0684ffd8921ba89aa598425a00acbccdbebfeb50d20

See more details on using hashes here.

File details

Details for the file decol-1.1.4-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for decol-1.1.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c72dcea17ec193b928e88a7619383edea14570723ffee4a8055f84a0c61c1294
MD5 50b4921921eea3ea2f911e937b0b4469
BLAKE2b-256 0b71391608303933c99af5a4ab1133de7ccfb728f95eb23c55065652fce4d17d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page