Skip to main content

Simple color printer for pandas DataFrames

pip install cythondfprint

Tested against Windows 10 / Python 3.11 / Anaconda

Important!

The module will be compiled when you import it for the first time. Cython and a C/C++ compiler must be installed!

import pandas as pd
from cythondfprint import add_printer

add_printer(1)  # overwrites __str__ and __repr__
df = pd.read_csv(
    "https://raw.githubusercontent.com/pandas-dev/pandas/main/doc/data/titanic.csv"
)
print(df)
df.ds_color_print_all()
df.ds_color_print_all(
    column_rep=70,  # repeat columns after 70 rows
    max_colwidth=300,  # max column width (0 = no limit)
    ljust_space=2,
    sep=" | ",
    vtm_escape=True,  # to look pretty here: https://github.com/directvt/vtm
)
pd.color_printer_reset()  # to restore default
print(df)
pd.color_printer_activate()  # to print in color
print(df)
print(df.Name) # Series
df.Name.ds_color_print_all()  # Series

Metadata

Release files for cythondfprint 0.13

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

Source distribution (sdist)

Source distribution for cythondfprint 0.13
File Size Uploaded Provenance Actions
cythondfprint-0.13.tar.gz 25.2 kB Without provenance Details for cythondfprint-0.13.tar.gz

Built distribution (wheel)

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

Total release size: 51.3 kB

Release files / cythondfprint-0.13.tar.gz

Download URL cythondfprint-0.13.tar.gz
Size 25.2 kB
Tags Source
SHA-256 checksum
How to use checksums
5f2a33d4e8859549b0cfd4c8a15b9a6d2d54015db26e05e6871df31f793069f5
BLAKE2b-256 checksum
How to use checksums
4e132051c3c27bb366016f827e2529cfe7e28030ef537f380e90ebd3cfeff956
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.9

Release files / cythondfprint-0.13-py3-none-any.whl

Download URL cythondfprint-0.13-py3-none-any.whl
Size 26.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5999e151a17428ee24922f3772c7088169a6fbdd0918c95806e3aa5629b22bea
BLAKE2b-256 checksum
How to use checksums
510f24b3907671f96dcba8e040a8a21b042a241c1b88ac22e31d519d5d3b56d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.9

Security for cythondfprint 0.13

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