This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
CSV Pivot
=========

Pivot tables for CSV files in the terminal.

Part of a set of terminal-based CSV tools, also including [CSV Match] (https://github.com/maxharlow/csvmatch) and [CSV Bar] (https://github.com/maxharlow/csvbar)

Tested on Python 2.7 and 3.5.


Installing
----------

pip install csvpivot


Usage
-----

Say you have a CSV file such as:

```
name,country,gender,salary
Oliver,UK,M,10000
Jack,UK,M,21000
Emily,UK,F,32000
Harry,UK,M,43000
Adam,France,M,54000
Paul,France,M,65000
Louise,France,F,76000
Alice,France,F,87000
Emma,Germany,F,98000
```

We could then find the average salary in each country:

```bash
$ csvpivot test.csv --rows country --values 'mean(salary)'

country,mean(salary)
France,70500
Germany,98000
UK,26500
```

It would be useful to find out the maximum and minimum values too though:

```bash
$ csvpivot test.csv --rows country --values 'mean(salary)' 'min(salary)' 'max(salary)'

country,mean(salary),min(salary),max(salary)
France,70500,54000,87000
Germany,98000,98000,98000
UK,26500,10000,43000
```

As well as `mean`, `min`, and `max`, CSV Pivot also supports `median`, `sum`, `stddev`, `count`, `countuniq`, `concat`, and `concatuniq`. All require numerical values apart from the last two. If numbers contain commas they are interpreted as thousands separators and removed.

Columns are also supported. So we could break down out data by gender:

```bash
$ csvpivot test.csv --rows country --values 'mean(salary)' --columns gender

country,mean(salary):F,mean(salary):M
France,81500,59500
Germany,98000,
UK,32000,24666.666666666668
```
Release History

Release History

1.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
csvpivot-1.1-py2.py3-none-any.whl (6.0 kB) Copy SHA256 Checksum SHA256 2.7 Wheel Apr 10, 2016
csvpivot-1.1.tar.gz (3.8 kB) Copy SHA256 Checksum SHA256 Source Apr 10, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting