great-tables

Make awesome display tables using Python

https://github.com/posit-dev/great-tables

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.3%) to scientific vocabulary

Keywords

easy-to-use formatting-data pandas-dataframe polars-dataframe python styling summary-tables tables

Keywords from Contributors

data-quality data-profiler data-validation easy-to-understand datacleaner pipeline-testing pandoc data-testing tabular-data schema-validator
Last synced: 6 months ago · JSON representation ·

Repository

Make awesome display tables using Python

Basic Info
Statistics
  • Stars: 2,423
  • Watchers: 15
  • Forks: 102
  • Open Issues: 139
  • Releases: 31
Topics
easy-to-use formatting-data pandas-dataframe polars-dataframe python styling summary-tables tables
Created almost 4 years ago · Last pushed 6 months ago
Metadata Files
Readme Contributing License Code of conduct Citation Codeowners

README.md

_Absolutely Delightful Table-making in Python_ [![Python Versions](https://img.shields.io/pypi/pyversions/great_tables.svg)](https://pypi.python.org/pypi/great_tables) [![PyPI](https://img.shields.io/pypi/v/great_tables)](https://pypi.org/project/great-tables/#history) [![PyPI Downloads](https://img.shields.io/pypi/dm/great-tables)](https://pypistats.org/packages/great-tables) [![License](https://img.shields.io/github/license/posit-dev/great-tables)](https://img.shields.io/github/license/posit-dev/great-tables) [![CI Build](https://github.com/posit-dev/great-tables/actions/workflows/ci-tests.yaml/badge.svg)](https://github.com/posit-dev/great-tables/actions/workflows/ci-tests.yaml) [![Codecov branch](https://img.shields.io/codecov/c/github/posit-dev/great-tables/main.svg)](https://codecov.io/gh/posit-dev/great-tables) [![Repo Status](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active) [![Documentation](https://img.shields.io/badge/docs-project_website-blue.svg)](https://posit-dev.github.io/great-tables/) [![Contributors](https://img.shields.io/github/contributors/posit-dev/great-tables)](https://github.com/posit-dev/great-tables/graphs/contributors) [![Discord](https://img.shields.io/discord/1086103944280952992?color=%237289da&label=Discord)](https://discord.com/invite/Ux7nrcXHVV) [![pyOpenSci Peer-Reviewed](https://pyopensci.org/badges/peer-reviewed.svg)](https://github.com/pyOpenSci/software-review/issues/202) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.14618357.svg)](https://doi.org/10.5281/zenodo.14618357) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.1%20adopted-ff69b4.svg)](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html)

With Great Tables anyone can make wonderful-looking tables in Python. The philosophy here is that we can construct a wide variety of useful tables by working with a cohesive set of table components. You can mix and match things like a header and footer, attach a stub (which contains row labels), arrange spanner labels over top of the column labels, and much more. Not only that, but you can format the cell values in a variety of awesome ways.

It all begins with table data in the form of a Pandas or Polars DataFrame. You then decide how to compose your output table with the elements and formatting you need for the task at hand. Finally, the table is rendered to HTML (the default option) or to an image file.

The Great Tables package is designed to be both straightforward yet powerful. The emphasis is on simple methods for the everyday display table needs (but power when you need it). Here is a brief example of how to use Great Tables to create a table from the included sp500 dataset:

```python from greattables import GT from greattables.data import sp500

Define the start and end dates for the data range

startdate = "2010-06-07" enddate = "2010-06-14"

Filter sp500 using Pandas to dates between start_date and end_date

sp500mini = sp500[(sp500["date"] >= startdate) & (sp500["date"] <= end_date)]

Create a display table based on the sp500_mini table data

( GT(sp500mini) .tabheader(title="S&P 500", subtitle=f"{startdate} to {enddate}") .fmtcurrency(columns=["open", "high", "low", "close"]) .fmtdate(columns="date", datestyle="wdmdayyear") .fmtnumber(columns="volume", compact=True) .colshide(columns="adj_close") ) ```

Typically we use Great Tables in an notebook environment or within a Quarto document. Tables won't print to the console, but using the show() method on a table object while in the console will open the HTML table in your default browser.

There are 16 datasets provided by Great Tables: countrypops, sza, gtcars, sp500, pizzaplace, exibble, towny, peeps, films, metro, gibraltar, constants, illness, reactions, photolysis, and nuclides.

All of this tabular data is great for experimenting with the functionality available inside Great Tables and we make extensive use of these datasets in our documentation.

Beyond the methods shown in the simple sp500-based example, there are many possible ways to create super-customized tables. Check out the documentation website to get started via introductory articles for making Great Tables. There's a handy Reference section that has detailed help for every method and function in the package.

Documentation Site

Let's talk about how to make Great Tables! There are a few locations where there is much potential for discussion.

One such place is in GitHub Discussions. This discussion board is especially great for Q&A, and many people have had their problems solved in there.

GitHub Discussions

Another fine venue for discussion is in our Discord server. This is a good option for asking about the development of Great Tables, pitching ideas that may become features, and sharing your table creations!

Discord Server

Finally, there is the X account. There you'll find posts about Great Tables (including sneak previews about in-development features) and other table-generation packages.

X Follow

These are all great places to ask questions about how to use the package, discuss some ideas, engage with others, and much more!

INSTALLATION

The Great Tables package can be installed from PyPI with:

bash $ pip install great_tables

You can also install Great Tables from Conda-Forge by using:

bash conda install conda-forge::great_tables

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.

Code of Conduct

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

Contributing to Great Tables

There are many ways to contribute to the ongoing development of the Great Tables package. Some contributions can be simple (like fixing typos, improving documentation, filing issues for feature requests or problems, etc.) and others might take more time and care (like answering questions and submitting PRs with code changes). Just know that anything you can do to help would be very much appreciated!

Please read over the contributing guidelines for information on how to get started.

License

Great Tables is licensed under the MIT license.

Posit Software, PBC.

Citation

If you use Great Tables in your research/project/product, we would appreciate a citation to the package. You can cite the package using the following BibTeX entry:

bibtex @software{Iannone_great_tables, author = {Iannone, Richard and Chow, Michael}, license = {MIT}, title = {{great-tables: Make awesome display tables using Python.}}, url = {https://github.com/posit-dev/great-tables}, version = {0.14.0} }

Governance

This project is primarily maintained by Rich Iannone and Michael Chow. Other authors may occasionally assist with some of these duties.

Owner

  • Name: posit-dev
  • Login: posit-dev
  • Kind: organization

Citation (CITATION.cff)

cff-version: 1.2.0
message: 'If you wish to cite the "great-tables" package use:'
type: software
license: MIT
title: "great-tables: Make awesome display tables using Python."
version: 0.14.0
abstract:
  Build display tables from tabular data with an easy-to-use set of methods.
  With its progressive approach, we can construct display tables with a cohesive set
  of table parts. Table values can be formatted using any of the included formatting
  functions. Cell styles can be precisely added through a location targeting system. The way
  in which Great Tables handles things for you means that you don't often have to worry about
  the fine details.
authors:
  - family-names: Iannone
    given-names: Richard
    email: rich@posit.co
    orcid: https://orcid.org/0000-0003-3925-190X
  - family-names: Michael
    given-names: Chow
    email: michael.chow@posit.co
repository: https://pypi.org/project/great-tables/
repository-code: https://github.com/posit-dev/great-tables
url: https://posit-dev.github.io/great-tables/
contact:
  - family-names: Iannone
    given-names: Richard
    email: rich@posit.co
    orcid: https://orcid.org/0000-0003-3925-190X

GitHub Events

Total
  • Fork event: 34
  • Create event: 61
  • Commit comment event: 3
  • Release event: 7
  • Issues event: 169
  • Watch event: 509
  • Delete event: 51
  • Member event: 2
  • Issue comment event: 475
  • Push event: 527
  • Pull request review event: 292
  • Pull request review comment event: 215
  • Pull request event: 184
Last Year
  • Fork event: 34
  • Create event: 61
  • Commit comment event: 3
  • Release event: 7
  • Issues event: 169
  • Watch event: 509
  • Delete event: 51
  • Member event: 2
  • Issue comment event: 475
  • Push event: 527
  • Pull request review event: 292
  • Pull request review comment event: 215
  • Pull request event: 184

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 2,744
  • Total Committers: 22
  • Avg Commits per committer: 124.727
  • Development Distribution Score (DDS): 0.239
Past Year
  • Commits: 486
  • Committers: 17
  • Avg Commits per committer: 28.588
  • Development Distribution Score (DDS): 0.459
Top Committers
Name Email Commits
Richard Iannone r****e@m****m 2,088
Michael Chow m****b@f****m 427
jrycw j****y@y****e 195
Tim Paine 3****e 9
marcozzxx810 m****g@g****m 4
Drew Seewald 3****l 2
Guillaume Lemaitre g****e@p****i 2
isabelizimm i****n@r****m 2
tylerriccio33 8****3 2
sergiolaverde0 s****0@n****g 1
Alessandro Molina a****o@m****i 1
Alfredo Carella a****a 1
BenGale93 5****3 1
Carlos Scheidegger 2****d 1
Cody c****y@d****v 1
Daniel Possenriede p****e@g****m 1
Jeff Hale d****r 1
Katie Masiello 3****o 1
Luke Manley l****y@g****m 1
Stijn de Gooijer s****r@g****m 1
Sugato Ray s****y 1
zachvalenta z****2@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 293
  • Total pull requests: 348
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 12 days
  • Total issue authors: 87
  • Total pull request authors: 28
  • Average comments per issue: 1.02
  • Average comments per pull request: 1.78
  • Merged pull requests: 245
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 115
  • Pull requests: 178
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 11 days
  • Issue authors: 49
  • Pull request authors: 20
  • Average comments per issue: 0.84
  • Average comments per pull request: 2.2
  • Merged pull requests: 118
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • machow (88)
  • rich-iannone (65)
  • jrycw (24)
  • juleswg23 (8)
  • Yasin197 (6)
  • tylerriccio33 (6)
  • karangattu (5)
  • astrowonk (3)
  • rasmi (3)
  • travis-leith (3)
  • andreas-vester (2)
  • isabelizimm (2)
  • BenGale93 (2)
  • atseewal (2)
  • FBruzzesi (2)
Pull Request Authors
  • rich-iannone (150)
  • jrycw (108)
  • machow (97)
  • juleswg23 (15)
  • tylerriccio33 (10)
  • FBruzzesi (6)
  • ChristopherRussell (5)
  • timkpaine (3)
  • glemaitre (3)
  • cscheid (3)
  • atseewal (2)
  • lschr (2)
  • dpprdan (2)
  • zachvalenta (2)
  • amol- (2)
Top Labels
Issue Labels
Type: ★ Enhancement (95) Type: ☹︎ Bug (87) Difficulty: [2] Intermediate (67) Effort: [2] Medium (59) Priority: [3] High (58) Type: ⁇ Question (28) Effort: [3] High (22) pyOpenSci Review (18) .epic (17) Type: ✎ Docs (14) Difficulty: [1] Novice (12) Priority: ♨︎ Critical (11) Priority: [2] Medium (11) Difficulty: [3] Advanced (8) Effort: [1] Low (6) Type: ٩(͡๏̯͡๏)۶ Refactor (3) Display: vscode (1) .blog (1)
Pull Request Labels
Type: ☹︎ Bug (1)

Packages

  • Total packages: 3
  • Total downloads:
    • pypi 335,917 last-month
  • Total dependent packages: 6
    (may contain duplicates)
  • Total dependent repositories: 0
    (may contain duplicates)
  • Total versions: 61
  • Total maintainers: 2
proxy.golang.org: github.com/posit-dev/great-tables
  • Versions: 29
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Stargazers count: 1.6%
Forks count: 3.0%
Average: 3.9%
Dependent packages count: 5.4%
Dependent repos count: 5.7%
Last synced: 6 months ago
pypi.org: react-tables

Easily generate information-rich, publication-quality tables from Python.

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 14 Last month
Rankings
Stargazers count: 2.8%
Forks count: 9.2%
Dependent packages count: 10.7%
Average: 20.8%
Dependent repos count: 60.4%
Maintainers (1)
Last synced: 6 months ago
pypi.org: great-tables

Easily generate information-rich, publication-quality tables from Python.

  • Documentation: https://great-tables.readthedocs.io/
  • License: MIT License Copyright (c) 2022-2024 Posit Software, PBC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  • Latest release: 0.18.0
    published 7 months ago
  • Versions: 31
  • Dependent Packages: 6
  • Dependent Repositories: 0
  • Downloads: 335,903 Last month
Rankings
Dependent packages count: 9.4%
Average: 38.7%
Dependent repos count: 68.1%
Maintainers (2)
Last synced: 6 months ago

Dependencies

.github/workflows/ci-docs.yaml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • bobheadxi/deployments v0.4.3 composite
  • peaceiris/actions-gh-pages v3 composite
  • quarto-dev/quarto-actions/setup v2 composite
.github/workflows/ci-tests.yaml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
pyproject.toml pypi
  • commonmark >=0.9.1
  • importlib-metadata *
  • libsass >=0.22.0
  • numpy >=1.22.4
  • packaging >=20.9
  • pandas >=1.4.2
  • typing_extensions >=3.10.0.0
requirements-dev.txt pypi
  • black >=22.3.0 development
  • flake8 >=3.9.2 development
  • myst-parser >=0.16.1 development
  • pandas-stubs >=1.2.0.58 development
  • pre-commit >=2.15.0 development
  • pyright >=1.1.244 development
  • pytest >=6.2.4 development
  • pytest-asyncio >=0.17.2 development
  • sphinx >=4.4.0 development
  • sphinx-autodoc-typehints ==1.15.3 development
  • sphinx-book-theme >=0.2.0 development
  • wheel * development
.github/workflows/code-checks.yaml actions
  • actions/checkout v4 composite
  • actions/setup-python v4 composite
  • pre-commit/action v2.0.3 composite