Skip to main content

pandas-render

pandas-render

Render pandas or polars DataFrames and Series as HTML tables with flexibility for formatting and styling.

GitHub Repo stars Ko-fi

Installation

pip install "pandas-render[pandas]"
pip install "pandas-render[polars]"

Usage

This is a simple example that demonstrates the basic functionality. The column names are used to match individual Jinja2 templates. And {{ content }} is the placeholder for the content of the original cell.

from pandas_render import pandas as pd

df = pd.DataFrame(
    [
        dict(name="Alice", age=25, hobbies=["coding"]),
        dict(name="Bob", age=30, hobbies=["reading", "hiking"]),
    ]
)

df.render(
    templates=dict(
        name="<strong>{{ content }}</strong>",
        age="{{ content }} years old",
        hobbies="<em>{{ content|join(', ') }}</em>",
    ),
    table_column_names=["Name", "Age", "Hobbies"],
)

The result is a rendered dataframe:

NameAgeHobbies
Alice25 years oldcoding
Bob30 years oldreading, hiking

Examples

Exciting and more powerful features can be explored and learned in the Getting Started notebook.

List of all notebooks with examples:

Support

Do you like this project? Fuel it with a ☕ coffee on Ko-fi. Every little bit helps and means a lot!

Contributing

We encourage you to contribute to this project! Please check out the contributing guidelines about how to proceed.

License

This package is Open Source Software released under the BSD-3-Clause license.

Metadata

Release files for pandas-render 0.4.1

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

Source distribution (sdist)

Source distribution for pandas-render 0.4.1
File Size Uploaded
pandas_render-0.4.1.tar.gz 151.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pandas-render 0.4.1
File Interpreter ABI Platform
pandas_render-0.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 162.4 kB

Release files / pandas_render-0.4.1.tar.gz

Download URL pandas_render-0.4.1.tar.gz
Size 151.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d0489ef9ad588ae36013fadd7ad72badfbdfe4cdff07d74576d245461c929ed2
BLAKE2b-256 checksum
How to use checksums
5142eed48f543c1d5ae854da9db72e04e0721678657b58e221208eb87b4df4ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Hatch/1.18.0 {"ci":true,"cpu":"x86_64","distro":{"id":"noble","libc":{"lib":"glibc","version":"2.39"},"name":"Ubuntu","version":"24.04"},"implementation":{"name":"CPython","version":"3.10.21"},"installer":{"name":"hatch","version":"1.18.0"},"openssl_version":"OpenSSL 3.5.7 9 Jun 2026","python":"3.10.21","system":{"name":"Linux","release":"6.17.0-1022-azure"}} HTTPX2/2.12.0

Release files / pandas_render-0.4.1-py3-none-any.whl

Download URL pandas_render-0.4.1-py3-none-any.whl
Size 11.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e7517629bea4030a1622c6d2856acd9151516ba70376a6ddbd5149be8e01135d
BLAKE2b-256 checksum
How to use checksums
4237453f93caf20549a003b66dab1149597d2fe8a61d5c9d47bb5191a6c13e87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Hatch/1.18.0 {"ci":true,"cpu":"x86_64","distro":{"id":"noble","libc":{"lib":"glibc","version":"2.39"},"name":"Ubuntu","version":"24.04"},"implementation":{"name":"CPython","version":"3.10.21"},"installer":{"name":"hatch","version":"1.18.0"},"openssl_version":"OpenSSL 3.5.7 9 Jun 2026","python":"3.10.21","system":{"name":"Linux","release":"6.17.0-1022-azure"}} HTTPX2/2.12.0

Release history Release notifications | RSS feed

This release

0.4.1 This release

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.1.0

2 release files

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