Skip to main content

Un-crosstab data in a text file.

Project description

un-xtab.py is a Python module and command-line program that rearranges data from a crosstabulated format to a normalized format. It takes data in this form:

Station

2006-05-23

2006-06-15

2006-07-19

WQ-01

4.5

3.7

6.8

WQ-02

9.7

5.1

7.2

WQ-03

10

6.1

8.8

and rearranges it into this form:

Station

Date

Value

WQ-01

2006-05-23

4.5

WQ-02

2006-05-23

3.7

WQ-03

2006-05-23

6.8

WQ-01

2006-06-15

9.7

WQ-02

2006-05-15

5.1

WQ-03

2006-06-15

7.2

WQ-01

2006-07-19

10

WQ-02

2006-07-19

6.1

WQ-03

2006-07-19

8.8

Input and output are both text (CSV) files.

You can use the un-xtab program to rearrange data that have been provided in a format designed for readability into a format that is more suitable for storage in a database, or for use with statistical, modeling, graphics, or other software.

The un-xtab program can deal with crosstabbed formats that include multiple rows of column headers and groups of data values that were crosstabbed together.

A row number can be added to assist with post-processing of the output file, if necessary.

Complete documentation is at ReadTheDocs: https://un-xtab.readthedocs.io/.

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

un-xtab-1.0.1.tar.gz (11.8 kB view details)

Uploaded Source

File details

Details for the file un-xtab-1.0.1.tar.gz.

File metadata

  • Download URL: un-xtab-1.0.1.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.9

File hashes

Hashes for un-xtab-1.0.1.tar.gz
Algorithm Hash digest
SHA256 74ce829aaae338846058b62cba268e8adb092c6bccd031d1cad909b592ca531e
MD5 c211b8f7021ee1d9e1da2d37f3e00863
BLAKE2b-256 8e5d430a460c84e43b7cffeb8542e4cb39c630b361d17e5b22e61bd8a74763a6

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