Skip to main content

Column.py

This is a modern re-implementation of the venerable old column application available on most Unix / Linux systems today.

Why re-implement this ancient tool?

BSD column has been, for many, the tool that almost works for every situation where we want to pretty-print a delimited table in textual form. Unfortunately, it lacks two highly desirable features.

  1. It has no option to right-justify columns instead of left-justifying them.

  2. It has no option to specify the output delimiter, and has two spaces hardcoded.

Why not just modify the original code?

The original code is over 20 years old, is written in a cryptic C style which does not lend itself to easy modification, and uses the compiler-dependent wchar_t type is not actually wide enough for Unicode.

Example Usage & Output

Consider the following input file, named Sample.txt:

Benchmark,Count,Avg,StdDev,Median,Min,Max
Core 1 to Core 2,3000000,125,431.937128,122,87,294738
Core 1 to Core 3,3000000,128,58.326363,123,87,54313
Core 2 to Core 1,3000000,129,323.379763,123,87,291708
Core 2 to Core 3,3000000,128,45.726372,123,74,37875
Core 3 to Core 1,3000000,128,42.615930,123,87,44093
Core 3 to Core 2,3000000,128,172.090219,122,78,266052

Under traditional column, the output looks like this:

$ column -t -s, Sample.txt
Benchmark         Count    Avg  StdDev      Median  Min  Max
Core 1 to Core 2  3000000  125  431.937128  122     87   294738
Core 1 to Core 3  3000000  128  58.326363   123     87   54313
Core 2 to Core 1  3000000  129  323.379763  123     87   291708
Core 2 to Core 3  3000000  128  45.726372   123     74   37875
Core 3 to Core 1  3000000  128  42.615930   123     87   44093
Core 3 to Core 2  3000000  128  172.090219  122     78   266052

With column.py, the output looks like this with default options:

$ column.py -s, Sample.txt
Benchmark           Count  Avg      StdDev  Median  Min     Max
Core 1 to Core 2  3000000  125  431.937128     122   87  294738
Core 1 to Core 3  3000000  128   58.326363     123   87   54313
Core 2 to Core 1  3000000  129  323.379763     123   87  291708
Core 2 to Core 3  3000000  128   45.726372     123   74   37875
Core 3 to Core 1  3000000  128   42.615930     123   87   44093
Core 3 to Core 2  3000000  128  172.090219     122   78  266052

Metadata

Release files for column.py 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for column.py 0.1.2
File Size Uploaded Provenance Actions
column.py-0.1.2.tar.gz 3.7 kB Without provenance Details for column.py-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for column.py 0.1.2
File Interpreter ABI Platform Actions
column.py-0.1.2-py3-none-any.whl Python 3 none any Details for column.py-0.1.2-py3-none-any.whl

Total release size: 7.4 kB

Release files / column.py-0.1.2.tar.gz

Download URL column.py-0.1.2.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
67099a253852e75be055113dd9529dd39262f74c5bf3413498d215a1e3952db9
BLAKE2b-256 checksum
How to use checksums
036f2c2b7bbbde720b7df1c3fd61b0136d2ad7a59e7b016b8d97b06094d3307d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.5

Release files / column.py-0.1.2-py3-none-any.whl

Download URL column.py-0.1.2-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
39fbec0d5c258469e88f9336d549a37c79975e1d616cf84174f47d3c14d20718
BLAKE2b-256 checksum
How to use checksums
2562ad176130e333a2dd6dbdbb21c4f75788ac1dbb88ff26ce3de21b2e46708d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.5

Security for column.py 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page