Skip to main content

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

Project description

decol
=====

[![Build Status](https://travis-ci.org/ctberthiaume/decol.svg?branch=master)](https://travis-ci.org/ctberthiaume/decol)

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.6.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

decol-1.1.6-py2.py3-none-any.whl (6.0 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

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

File hashes

Hashes for decol-1.1.6.tar.gz
Algorithm Hash digest
SHA256 2b7a672de2baf24123ed52350896373c28ea9b7772bfcf440f32a1db384a8f7b
MD5 c93a9015b5e8f7bf5e587f122cc78553
BLAKE2b-256 57f8cda974b1aa38d249ed6a2c8092dff3366825290095117bd4aa2455a10814

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for decol-1.1.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4ccc0f660a66f69fc4ca546971991dbd26582b3db562d61d9c1e080f609f27b3
MD5 2eaf6a04ba7695969c284a1bcc96fc6c
BLAKE2b-256 b95ef427a8b140be73b8b51c1385e053a84ab009ba3b707d814dc36c17a6663d

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