Tabulate
raw JSON → 0.10.0 verified Tue May 12 auth: no python install: verified quickstart: verified
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.
pip install tabulate Common errors
error ModuleNotFoundError: No module named 'tabulate' ↓
cause The `tabulate` library has not been installed in the Python environment where the code is being executed.
fix
pip install tabulate
error ValueError: Data must be a list of lists, list of dicts, or a dictionary of lists ↓
cause The data provided to the `tabulate()` function does not match any of the expected input formats required by the library.
fix
Ensure your data is structured as a list of lists (for rows), a list of dictionaries (where keys are headers), or a dictionary of lists (where keys are headers and values are columns).
error ValueError: Data and headers must have the same number of columns ↓
cause The number of headers provided does not match the number of columns (elements in each row) in the data passed to `tabulate()`.
fix
Adjust the
headers list or the data to ensure that the number of headers precisely corresponds to the number of columns in your data. error TypeError: 'dict' object is not iterable ↓
cause A dictionary was directly passed as data to `tabulate()` which expects an iterable of rows (like a list or tuple), but a raw dictionary is not iterable in that context.
fix
Convert the dictionary into an iterable format
tabulate can process, such as my_dict.items() for a two-column table (key, value), or transform it into a list of dictionaries for more complex structures. Warnings
breaking Dropped Python 2 support in version 1.0.0 ↓
fix Upgrade to Python 3.10 or later
deprecated The 'Dataset.export' method is deprecated; use 'Dataset.export('format')' instead ↓
fix Update code to use the new export method syntax
Install compatibility verified last tested: 2026-05-12
python os / libc status wheel install import disk
3.10 alpine (musl) - - 0.17s 18.0M
3.10 slim (glibc) - - 0.15s 19M
3.11 alpine (musl) - - 0.21s 19.9M
3.11 slim (glibc) - - 0.17s 20M
3.12 alpine (musl) - - 0.17s 11.7M
3.12 slim (glibc) - - 0.17s 12M
3.13 alpine (musl) - - 0.17s 11.4M
3.13 slim (glibc) - - 0.15s 12M
3.9 alpine (musl) - - 0.03s 17.5M
3.9 slim (glibc) - - 0.03s 18M
Imports
- tabulate
from tabulate import tabulate
Quickstart verified last tested: 2026-04-23
import os
from tabulate import tabulate
data = [['Name', 'Age'], ['Alice', 30], ['Bob', 25]]
print(tabulate(data, headers='firstrow', tablefmt='grid'))