Name | great-tables JSON |
Version |
0.15.0
JSON |
| download |
home_page | None |
Summary | Easily generate information-rich, publication-quality tables from Python. |
upload_time | 2024-12-14 00:31:51 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
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. |
keywords |
tables
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
<div align="center">
<a href="https://posit-dev.github.io/great-tables/"><img src="https://posit-dev.github.io/great-tables/assets/GT_logo.svg" width="350px"/></a>
_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)
[![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)
</div>
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.
<div align="center">
<img src="https://posit-dev.github.io/great-tables/assets/the_components_of_a_table.svg" width="800px">
</div>
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 great_tables import GT
from great_tables.data import sp500
# Define the start and end dates for the data range
start_date = "2010-06-07"
end_date = "2010-06-14"
# Filter sp500 using Pandas to dates between `start_date` and `end_date`
sp500_mini = sp500[(sp500["date"] >= start_date) & (sp500["date"] <= end_date)]
# Create a display table based on the `sp500_mini` table data
(
GT(sp500_mini)
.tab_header(title="S&P 500", subtitle=f"{start_date} to {end_date}")
.fmt_currency(columns=["open", "high", "low", "close"])
.fmt_date(columns="date", date_style="wd_m_day_year")
.fmt_number(columns="volume", compact=True)
.cols_hide(columns="adj_close")
)
```
<div align="center">
<img src="https://posit-dev.github.io/great-tables/assets/gt_sp500_table.svg" width="800px">
</div>
Typically we use Great Tables in an notebook environment or within a [**Quarto**](https://quarto.org) document. Tables won't print to the console, but using the [`show()` method](https://posit-dev.github.io/great-tables/reference/GT.show.html#great_tables.GT.show) on a table object while in the console will open the HTML table in your default browser.
There are ten datasets provided by **Great Tables**: `countrypops`, `sza`, `gtcars`, `sp500`, `pizzaplace`, `exibble`, `towny`, `metro`, `constants`, and `illness`.
<div align="center" style="padding-top:20px">
<img src="https://posit-dev.github.io/great-tables/assets/datasets.png" style="width:100%;">
</div>
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](https://posit-dev.github.io/great-tables/) 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](https://img.shields.io/badge/Project%20Website-Documentation%20and%20Reference-blue?style=social)](https://posit-dev.github.io/great-tables/)
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_](https://github.com/posit-dev/great-tables/discussions). This discussion board is especially great for Q&A, and many people have had their problems solved in there.
[![GitHub Discussions](https://img.shields.io/badge/GitHub%20Discussions-Ask%20about%20anything-blue?style=social&logo=github&logoColor=gray)](https://github.com/posit-dev/great-tables/discussions)
Another fine venue for discussion is in our [_Discord server_](https://discord.com/invite/Ux7nrcXHVV). 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](https://img.shields.io/badge/Discord-Chat%20with%20us-blue?style=social&logo=discord&logoColor=purple)](https://discord.com/invite/Ux7nrcXHVV)
Finally, there is the [_X account_](https://twitter.com/gt_package). There you'll find posts about **Great Tables** (including sneak previews about in-development features) and other table-generation packages.
[![X Follow](https://img.shields.io/twitter/follow/gt_package?style=social)](https://twitter.com/gt_package)
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](https://anaconda.org/conda-forge/great_tables) 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](https://github.com/posit-dev/great-tables/issues).
## Code of Conduct
Please note that the **Great Tables** project is released with a [contributor code of conduct](https://www.contributor-covenant.org/version/2/1/code_of_conduct/).<br>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](https://github.com/posit-dev/great-tables/blob/main/CONTRIBUTING.md) 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](https://twitter.com/riannone) and [Michael Chow](https://twitter.com/chowthedog).
Other authors may occasionally assist with some of these duties.
Raw data
{
"_id": null,
"home_page": null,
"name": "great-tables",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "tables",
"author": null,
"author_email": "Richard Iannone <rich@posit.co>, Michael Chow <michael.chow@posit.co>",
"download_url": "https://files.pythonhosted.org/packages/3e/ad/9d18ba9188b408b0e980dfdb8810309194f615bd548c194ad4b977c28adb/great_tables-0.15.0.tar.gz",
"platform": null,
"description": "<div align=\"center\">\n\n<a href=\"https://posit-dev.github.io/great-tables/\"><img src=\"https://posit-dev.github.io/great-tables/assets/GT_logo.svg\" width=\"350px\"/></a>\n\n_Absolutely Delightful Table-making in Python_\n\n[![Python Versions](https://img.shields.io/pypi/pyversions/great_tables.svg)](https://pypi.python.org/pypi/great_tables)\n[![PyPI](https://img.shields.io/pypi/v/great_tables)](https://pypi.org/project/great-tables/#history)\n[![PyPI Downloads](https://img.shields.io/pypi/dm/great-tables)](https://pypistats.org/packages/great-tables)\n[![License](https://img.shields.io/github/license/posit-dev/great-tables)](https://img.shields.io/github/license/posit-dev/great-tables)\n\n[![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)\n[![Codecov branch](https://img.shields.io/codecov/c/github/posit-dev/great-tables/main.svg)](https://codecov.io/gh/posit-dev/great-tables)\n[![Repo Status](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)\n[![Documentation](https://img.shields.io/badge/docs-project_website-blue.svg)](https://posit-dev.github.io/great-tables/)\n\n[![Contributors](https://img.shields.io/github/contributors/posit-dev/great-tables)](https://github.com/posit-dev/great-tables/graphs/contributors)\n[![Discord](https://img.shields.io/discord/1086103944280952992?color=%237289da&label=Discord)](https://discord.com/invite/Ux7nrcXHVV)\n[![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)\n\n</div>\n\nWith **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.\n\n<div align=\"center\">\n<img src=\"https://posit-dev.github.io/great-tables/assets/the_components_of_a_table.svg\" width=\"800px\">\n</div>\n\nIt 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.\n\nThe **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:\n\n```python\nfrom great_tables import GT\nfrom great_tables.data import sp500\n\n# Define the start and end dates for the data range\nstart_date = \"2010-06-07\"\nend_date = \"2010-06-14\"\n\n# Filter sp500 using Pandas to dates between `start_date` and `end_date`\nsp500_mini = sp500[(sp500[\"date\"] >= start_date) & (sp500[\"date\"] <= end_date)]\n\n# Create a display table based on the `sp500_mini` table data\n(\n GT(sp500_mini)\n .tab_header(title=\"S&P 500\", subtitle=f\"{start_date} to {end_date}\")\n .fmt_currency(columns=[\"open\", \"high\", \"low\", \"close\"])\n .fmt_date(columns=\"date\", date_style=\"wd_m_day_year\")\n .fmt_number(columns=\"volume\", compact=True)\n .cols_hide(columns=\"adj_close\")\n)\n```\n\n<div align=\"center\">\n<img src=\"https://posit-dev.github.io/great-tables/assets/gt_sp500_table.svg\" width=\"800px\">\n</div>\n\nTypically we use Great Tables in an notebook environment or within a [**Quarto**](https://quarto.org) document. Tables won't print to the console, but using the [`show()` method](https://posit-dev.github.io/great-tables/reference/GT.show.html#great_tables.GT.show) on a table object while in the console will open the HTML table in your default browser.\n\nThere are ten datasets provided by **Great Tables**: `countrypops`, `sza`, `gtcars`, `sp500`, `pizzaplace`, `exibble`, `towny`, `metro`, `constants`, and `illness`.\n\n<div align=\"center\" style=\"padding-top:20px\">\n<img src=\"https://posit-dev.github.io/great-tables/assets/datasets.png\" style=\"width:100%;\">\n</div>\n\nAll 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.\n\nBeyond the methods shown in the simple `sp500`-based example, there are many possible ways to create super-customized tables. Check out the [documentation website](https://posit-dev.github.io/great-tables/) 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.\n\n[![Documentation Site](https://img.shields.io/badge/Project%20Website-Documentation%20and%20Reference-blue?style=social)](https://posit-dev.github.io/great-tables/)\n\nLet's talk about how to make **Great Tables**! There are a few locations where there is much potential for discussion.\n\nOne such place is in [_GitHub Discussions_](https://github.com/posit-dev/great-tables/discussions). This discussion board is especially great for Q&A, and many people have had their problems solved in there.\n\n[![GitHub Discussions](https://img.shields.io/badge/GitHub%20Discussions-Ask%20about%20anything-blue?style=social&logo=github&logoColor=gray)](https://github.com/posit-dev/great-tables/discussions)\n\nAnother fine venue for discussion is in our [_Discord server_](https://discord.com/invite/Ux7nrcXHVV). This is a good option for asking about the development of **Great Tables**, pitching ideas that may become features, and sharing your table creations!\n\n[![Discord Server](https://img.shields.io/badge/Discord-Chat%20with%20us-blue?style=social&logo=discord&logoColor=purple)](https://discord.com/invite/Ux7nrcXHVV)\n\nFinally, there is the [_X account_](https://twitter.com/gt_package). There you'll find posts about **Great Tables** (including sneak previews about in-development features) and other table-generation packages.\n\n[![X Follow](https://img.shields.io/twitter/follow/gt_package?style=social)](https://twitter.com/gt_package)\n\nThese are all great places to ask questions about how to use the package, discuss some ideas, engage with others, and much more!\n\n## INSTALLATION\n\nThe **Great Tables** package can be installed from **PyPI** with:\n\n```bash\n$ pip install great_tables\n```\n\nYou can also install [Great Tables from Conda-Forge](https://anaconda.org/conda-forge/great_tables) by using:\n\n```bash\nconda install conda-forge::great_tables\n```\n\nIf you encounter a bug, have usage questions, or want to share ideas to make this package better, please feel free to file an [issue](https://github.com/posit-dev/great-tables/issues).\n\n## Code of Conduct\n\nPlease note that the **Great Tables** project is released with a [contributor code of conduct](https://www.contributor-covenant.org/version/2/1/code_of_conduct/).<br>By participating in this project you agree to abide by its terms.\n\n## Contributing to **Great Tables**\n\nThere 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!\n\nPlease read over the [contributing guidelines](https://github.com/posit-dev/great-tables/blob/main/CONTRIBUTING.md) for information on how to get started.\n\n## \ud83d\udcc4 License\n\n**Great Tables** is licensed under the MIT license.\n\n\u00a9 Posit Software, PBC.\n\n## Citation\n\nIf 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:\n\n```bibtex\n@software{Iannone_great_tables,\nauthor = {Iannone, Richard and Chow, Michael},\nlicense = {MIT},\ntitle = {{great-tables: Make awesome display tables using Python.}},\nurl = {https://github.com/posit-dev/great-tables},\nversion = {0.14.0}\n}\n```\n\n## \ud83c\udfdb\ufe0f Governance\n\nThis project is primarily maintained by [Rich Iannone](https://twitter.com/riannone) and [Michael Chow](https://twitter.com/chowthedog).\nOther authors may occasionally assist with some of these duties.\n",
"bugtrack_url": null,
"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. ",
"summary": "Easily generate information-rich, publication-quality tables from Python.",
"version": "0.15.0",
"project_urls": {
"documentation": "https://posit-dev.github.io/great-tables/",
"homepage": "https://github.com/posit-dev/great-tables"
},
"split_keywords": [
"tables"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4a552700f5f5a3032d04c0517bb27d52705be2059ca73df2e24e6a9959a5164e",
"md5": "f46eba8fe3efac680bccc33f868162fe",
"sha256": "e4f7007aaaef747db7e613d2c85858aeca2e675924169649a8b48dbbb6fe0125"
},
"downloads": -1,
"filename": "great_tables-0.15.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f46eba8fe3efac680bccc33f868162fe",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 1374186,
"upload_time": "2024-12-14T00:31:48",
"upload_time_iso_8601": "2024-12-14T00:31:48.108218Z",
"url": "https://files.pythonhosted.org/packages/4a/55/2700f5f5a3032d04c0517bb27d52705be2059ca73df2e24e6a9959a5164e/great_tables-0.15.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3ead9d18ba9188b408b0e980dfdb8810309194f615bd548c194ad4b977c28adb",
"md5": "ebbf86d17fe50bb43d228c6ec2e02232",
"sha256": "e0d37e5fdde4bd3d21290945f3de6b00410abca05e46a045cdda9259eaa8f590"
},
"downloads": -1,
"filename": "great_tables-0.15.0.tar.gz",
"has_sig": false,
"md5_digest": "ebbf86d17fe50bb43d228c6ec2e02232",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 11316687,
"upload_time": "2024-12-14T00:31:51",
"upload_time_iso_8601": "2024-12-14T00:31:51.609710Z",
"url": "https://files.pythonhosted.org/packages/3e/ad/9d18ba9188b408b0e980dfdb8810309194f615bd548c194ad4b977c28adb/great_tables-0.15.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-14 00:31:51",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "posit-dev",
"github_project": "great-tables",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "great-tables"
}