python-tabulate

Pretty-print tabular data in Python with multiple output formats

brewmacoslinux
Try with needOr install directly
Source

About

Pretty-print tabular data in Python

Commands

python-tabulate

Examples

Format a simple list of lists as a table$ python -c "from tabulate import tabulate; print(tabulate([['Alice', 24], ['Bob', 19]], headers=['Name', 'Age']))"
Display data with a specific table format (grid style)$ python -c "from tabulate import tabulate; data = [['Item1', 100], ['Item2', 200]]; print(tabulate(data, headers=['Product', 'Price'], tablefmt='grid'))"
Convert CSV-like data to formatted table output$ python -c "from tabulate import tabulate; print(tabulate([['user1', 'admin'], ['user2', 'guest']], headers=['Username', 'Role'], tablefmt='rst'))"