Skip to main content

gt-extras

Python Versions PyPI PyPI Downloads License

Tests Documentation Repo Status Contributors

⚠️ gt-extras is currently in development, expect breaking changes.

What is gt-extras?

A collection of additional helper functions for creating beautiful tables with the great-tables package in Python.

The functions in gt-extras are designed to make it easier to add plots, icons, color gradients, and other enhancements to your tables. We wrap up common patterns and boilerplate so you can focus on your data and presentation. It is based on the R package gtExtras, which was designed with a similar goal in mind.

Installation

Install the latest release from PyPI: pip install gt-extras

Example Usage

from great_tables import GT
from great_tables.data import gtcars
import gt_extras as gte

gtcars_mini = gtcars.iloc[5:15].copy().reset_index(drop=True)
gtcars_mini["efficiency"] = gtcars_mini["mpg_c"] / gtcars_mini["hp"] * 100

(
    # Start with a standard GT
    GT(gtcars_mini, rowname_col="model")
    .tab_stubhead(label="Vehicle")
    .cols_hide(["drivetrain", "hp_rpm", "trq_rpm", "trim", "bdy_style", "msrp", "trsmn", "ctry_origin"])
    .cols_align("center")
    .tab_header(title="Car Performance Review", subtitle="Using gt-extras functionality")

    # Add gt-extras features using gt.pipe()
    .pipe(gte.gt_color_box, columns=["hp", "trq"], palette=["lightblue", "darkblue"])
    .pipe(gte.gt_plt_dot, category_col="mfr", data_col="efficiency", domain=[0, 0])
    .pipe(gte.gt_plt_bar, columns=["mpg_c", "mpg_h"])
    .pipe(gte.gt_fa_rating, columns="efficiency")
    .pipe(gte.gt_hulk_col_numeric, columns="year", palette="viridis")
    .pipe(gte.gt_theme_538)
)

Features

  • Apply color gradients and highlights
  • Add plots to table cells for visual data representation
  • Embed FontAwesome icons
  • Use pre-built themes for quick styling
  • Utilize helper utilities for common table tasks

Contributing

If you encounter a bug, have usage questions, or want to share ideas to make this package better, please feel free to file an issue.

In general, if you're interested in extending Great Tables functionality, this subsection of the Great Tables get-started page is a great place to start.

Some of the work that went into this project was featured on the great tables blog, if you choose to contribute hopefully that can give you a sense of the process!

Code of Conduct

Please note that the gt-extras project is released with a contributor code of conduct.
By participating in this project you agree to abide by its terms.

📄 License

Great Tables is licensed under the MIT license.

© Posit Software, PBC.

Citation

If you use gt-extras in your work, please cite the package:

@software{gt_extras,
authors = {Jules Walzer-Goldfeld, Michael Chow, and Rich Iannone},
license = {MIT},
title = {{gt-extras: Extra helpers for great-tables in Python.}},
url = {https://github.com/posit-dev/gt-extras}, version = {0.0.1}
}

For more information, see the docs or open an issue with questions or suggestions!

Metadata

Release files for gt-extras 0.0.8

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

Source distribution (sdist)

Source distribution for gt-extras 0.0.8
File Size Uploaded
gt_extras-0.0.8.tar.gz 1.5 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for gt-extras 0.0.8
File Interpreter ABI Platform
gt_extras-0.0.8-py3-none-any.whl Python 3 none any Details

Total release size: 1.6 MB

Release files / gt_extras-0.0.8.tar.gz

Download URL gt_extras-0.0.8.tar.gz
Size 1.5 MB
Tags Source
SHA-256 checksum
How to use checksums
c59dde8c8ff99b72ff2f4ad7c29de075565b9ca74f6ba8abea0e4b25e05a376c
BLAKE2b-256 checksum
How to use checksums
e0e4028aee7667f7e41765ab694d1eba18682417f76695b7293dd9579cdc3bd9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 18, 2025.

Transparency log

Release files / gt_extras-0.0.8-py3-none-any.whl

Download URL gt_extras-0.0.8-py3-none-any.whl
Size 90.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
24df115734ba6b2d49f6773bc2de5e711382b6ebd3c45b17843b0b46800bd70a
BLAKE2b-256 checksum
How to use checksums
62b13b990d3c0c0414e68d7abd679fc63271dafbf156404a3a393ebf446e85f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 18, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.8 This release

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.2

2 release files

0.0.1

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