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

Uploaded Source

Built Distribution

decol-1.1.5-py2.py3-none-any.whl (5.7 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

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

File hashes

Hashes for decol-1.1.5.tar.gz
Algorithm Hash digest
SHA256 3485e4c778fad61648a0a7a3155be41eb309eed0398b1914a95bfa4fe1ef90eb
MD5 83d1681f4d72a3565f2c9334925d932b
BLAKE2b-256 a0319391552be7e25b00aeeb8f61031ae4c709b3e92bd126ba481304e9b438ae

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for decol-1.1.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 07b18a102246382a2196a41a123adf0046f7987cadb76763f8e40308de5bbcf2
MD5 f61ae4646b36e0b6f7b3244bbd3cdaf0
BLAKE2b-256 0c66aa781eb8a5be2a3b6551d42ef89efb05e2b8274594cc7e690aae9e88119a

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