Tabulate
Tabulate is a Python library for pretty-printing tabular data. The current version is 0.10.0, released three weeks ago. It is actively maintained and supports Python versions 3.10 and above. The release cadence is approximately every few weeks.
Warnings
- breaking Dropped Python 2 support in version 1.0.0
- deprecated The 'Dataset.export' method is deprecated; use 'Dataset.export('format')' instead
Install
-
pip install tabulate
Imports
- tabulate
from tabulate import tabulate
Quickstart
import os from tabulate import tabulate data = [['Name', 'Age'], ['Alice', 30], ['Bob', 25]] print(tabulate(data, headers='firstrow', tablefmt='grid'))