Repolode
posit-dev

posit-dev/great-tables

A Python library for building styled, publication-quality display tables from pandas or Polars DataFrames, rendered to HTML or images.

Stars
2,903
Forks
141
Open issues
73
Last commit
yesterday

What is it?

Great Tables is a Python package for turning DataFrames into display-ready tables. It works from a set of composable table components: a header and footer, a stub holding row labels, spanner labels above column labels, and more. Cell values can be formatted in many ways, including currency, dates, and compact numbers, and columns can be hidden or reordered.

The package accepts pandas or Polars DataFrames as input. A table is built by chaining methods on a GT object, and the result is rendered to HTML by default or saved to an image file. It is intended for use in Jupyter notebooks and Quarto documents, and the show() method opens the table in a browser when run from a console.

The package includes 16 example datasets, such as sp500 and gtcars, along with online documentation and a reference for each method.

Key features

  • 01Builds tables from pandas or Polars DataFrames using chained methods.
  • 02Supports headers, footers, row-label stubs, and spanner labels over column labels.
  • 03Formats cell values for currency, dates, and compact numbers.
  • 04Renders output as HTML by default, or to an image file.
  • 05Ships with 16 example datasets for experimentation.

Use cases

  • Presenting summary statistics in a Jupyter notebook.
  • Producing formatted tables inside Quarto reports.
  • Styling pandas or Polars query results for sharing with non-technical readers.

Quick start

  1. 1

    Install from PyPI

    pip install great_tables
  2. 2

    Import GT and a sample dataset in Python

    from great_tables import GT from great_tables.data import sp500
  3. 3

    Build a table from a DataFrame and render it in a notebook or Quarto document

Things to know

  • Tables render to HTML by default and are not printed to the console, so viewing output needs a notebook, Quarto, or the show() method.

Topics

FAQ

What is great-tables?
A Python library for building styled, publication-quality display tables from pandas or Polars DataFrames, rendered to HTML or images. Great Tables is a Python package for turning DataFrames into display-ready tables. It works from a set of composable table components: a header and footer, a stub holding row labels, spanner labels above column labels, and more. Cell values can be formatted in many ways, including currency, dates, and compact numbers, and columns can be hidden or reordered.
Is great-tables free to use? What license does it have?
great-tables is open source under the MIT license. Check the license terms before using it in commercial products.
Is great-tables still maintained?
Actively maintained. The last commit to great-tables was on Oct 18, 2026.
What can I use great-tables for?
Presenting summary statistics in a Jupyter notebook. Producing formatted tables inside Quarto reports. Styling pandas or Polars query results for sharing with non-technical readers.
How do I install great-tables?
Install from PyPI: pip install great_tables Import GT and a sample dataset in Python: from great_tables import GT from great_tables.data import sp500 Build a table from a DataFrame and render it in a notebook or Quarto document
Where can I get great-tables?
The source code and installation instructions are on GitHub: https://github.com/posit-dev/great-tables

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects