Skip to main content

About

This python3 module aims to add additional functionality to the already amazing TablePrint (github.com/nirum/tableprint).

While TablePrint is functionally excellent at printing out text to the console in a beautiful manner, I have found that it lacks some dynamicism. When printing to a console that is constantly different sizes for example, wrapping the text around produces basically illegible tables.

This module aims to improve the situation where the user is doing data heavy string representation, using data processing packages such as Pandas (which, this module only supports, and also, thank you to nirum for adding in Pandas DataFrame support). Based on the size of the console, and some priorities to each column given by the user, we will squish columns as needed until it fits nicely within the given constraints. When the console width changes, the program will need to be reloaded, but will adjust to fit the new screen.

Installation

You'll have to clone directly from github into your source repo for now. Looking into improving this!

Usage

from dynamictableprint import DynamicTablePrint
import pandas as pd

d = {
    'names': [
        "Albert Einstein",
        "Issac Newton",
        "Stephen Hawkings"
    ],
    'places': [
        "Ulm, Germany",
        "Wolsthorpe Manor, United Kingdom",
        "Oxford, United Kingdom"
    ],
    'Foods': [
        "Spaghetti",
        "Pasta",
        "Noodles"
    ]
}
data_frame = pd.DataFrame(data=d)

dtp = DynamicTablePrint(data_frame, angel_column='Foods', squish_column='places')
dtp.banner('Things!')
dtp.
dtp.write_to_screen()

The squish_column represents the column that you would like to be squished first. Typically the 'squish factor' is 20% at most, but will dynamically vary depending on how the other columns are. The angel_column is the column that you would prefer to be modified last, that is, having the highest priority on being the same.

Dependencies

python3.6, an possibly other versions >3.0 tableprint pandas

License

MIT

Metadata

Release files for dynamictableprint 1.0.3

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

Source distribution (sdist)

Source distribution for dynamictableprint 1.0.3
File Size Uploaded Provenance Actions
dynamictableprint-1.0.3.tar.gz 8.8 kB Without provenance Details for dynamictableprint-1.0.3.tar.gz

Built distribution (wheel)

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

Total release size: 15.6 kB

Release files / dynamictableprint-1.0.3.tar.gz

Download URL dynamictableprint-1.0.3.tar.gz
Size 8.8 kB
Tags Source
SHA-256 checksum
How to use checksums
1c5882e9ba7e85d9adec9e83f33d3faea9c1482eee8c8c0959b660338813f9e1
BLAKE2b-256 checksum
How to use checksums
3b79a0c564d7957a56b720a6115ce3fba59d997c16112bebd9657106372b0a38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / dynamictableprint-1.0.3-py3-none-any.whl

Download URL dynamictableprint-1.0.3-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
96855b3b9c00470c3796602d95d677c565e50a3833b2e8ec529cf595229656fc
BLAKE2b-256 checksum
How to use checksums
00584fdb80875e617c5245927da275172eec53c163b0f9fe2688fc3dd526dad8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for dynamictableprint 1.0.3

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.

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