A python package with helpful tools when working with the rich python library.
🔧 Rich Tools
A python package with helpful functions for use alongside with the rich python library.
The current features are:
By making this conversion, we can now pretty print a DataFrame in the terminal with rich. Bridging the gap between pandas and rich also provides a path for loading external data into a rich Table using Pandas functions such as
By bridging the gap between a rich Table and a DataFrame, we can now take additional actions on our data such as
saving the data to a csv using the Pandas function
Convert a rich Table into a list of dictionaries. ➜
Get your tables rows as a list of dictionaries with column names as key, and row contents as values.
Strip rich markup tags from a string. ➜
Helper function to remove tags from text formatted with rich.
$ pip install rich-tools
Additional examples can be found in the examples dir.
# Print csv data to the terminal as a pretty printed rich formatted table import pandas as pd from rich import print from rich_tools import df_to_table if __name__ == '__main__': df = pd.read_csv("sample_input.csv") table = df_to_table(df) print(table)
- Like the rich package itself, its creator Will McGugan is awesome! Check out Textual "a TUI (Text User Interface) framework for Python inspired by modern web development". Thank you for the advice you've given on this project! 🙏
- I am grateful for folks who give some of their time to this project in any form. Check out the list of contributors and learn more about contributing here.
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Hashes for rich_tools-0.5.0-py3-none-any.whl