Skip to content

Latest commit

 

History

History
131 lines (87 loc) · 2.78 KB

index.rst

File metadata and controls

131 lines (87 loc) · 2.78 KB

csvkit

About

Principles

csvkit is to tabular data what the standard Unix text processing suite (grep, sed, cut, sort) is to text. As such, csvkit adheres to the Unix philosophy.

  1. Small is beautiful.
  2. Make each program do one thing well.
  3. Build a prototype as soon as possible.
  4. Choose portability over efficiency.
  5. Store data in flat text files.
  6. Use software leverage to your advantage.
  7. Use shell scripts to increase leverage and portability.
  8. Avoid captive user interfaces.
  9. Make every program a filter.

As there is no formally defined CSV format, csvkit encourages well-known formatting standards:

  • Output favors compatability with the widest range of applications. This means that quoting is done with double-quotes and only when necessary, columns are separated with commas, and lines are terminated with unix style line endings ("n").
  • Data that is modified or generated will prefer consistency over brevity. Floats always include at least one decimal place, even if they are round. Dates and times are written in ISO8601 format.

Installation

For users:

pip install csvkit

For developers:

git clone git://github.com/onyxfish/csvkit.git
cd csvkit
mkvirtualenv --no-site-packages csvkit
pip install -r requirements.txt
nosetests

Tutorial

The csvkit tutorial walks through processing and analyzing a real dataset from data.gov. It is divided into several parts for easier reading:

tutorial/getting_started tutorial/examining_the_data tutorial/adding_another_year tutorial/wrapping_up

Usage

csvkit is comprised of a number of individual command line utilities that be loosely divided into a few major categories: Input, Processing, and Output. Documentation and examples for each utility are described on the following pages.

Input

scripts/in2csv

Processing

scripts/csvclean scripts/csvcut scripts/csvgrep scripts/csvjoin scripts/csvsort scripts/csvstack

Output (and Analysis)

scripts/csvlook scripts/csvsql scripts/csvstat

Appendices

scripts/common_arguments

Development

Documentation on how to use csvkit as a library is coming soon...

Contributing

Want to hack on csvkit? Here's how:

contributing

Authors

License

Indices and tables

  • genindex
  • modindex
  • search