Quick Start#

CI codecov.io Pypi Conda Version pyversions Code style: black Star

Turn your Python DataFrames into Interactive DataTables#

This packages changes how Pandas and Polars DataFrames are rendered in Jupyter Notebooks. With itables you can display your tables as interactive DataTables that you can sort, paginate, scroll or filter.

ITables is just about how tables are displayed. You can turn it on and off in just two lines, with no other impact on your data workflow.

The itables package depends only on numpy, pandas and IPython which you must already have if you work with Pandas in Jupyter (add polars, pyarrow if you work with Polars DataFrames).


Install the itables package with either

pip install itables


conda install itables -c conda-forge

Activate ITables#

Activate the interactive mode for all series and dataframes with

from itables import init_notebook_mode


After this, any Pandas or Polars DataFrame, or Series, is displayed as an interactive DataTables, which lets you explore, filter or sort your data.

from itables.sample_dfs import get_countries

df = get_countries(html=False)
region country capital longitude latitude
Loading... (need help?)

Offline mode versus connected mode#

ITables use two Javascript libraries: jQuery and DataTables.

By default itables works offline. No internet connection is required as the two libraries are embedded into the notebook itself when you execute init_notebook_mode.

In some contexts (Jupyter Book, Jupyter Colab, etc…) you might prefer to load the libraries dynamically from the internet. To do so, add the argument connected=True when you execute init_notebook_mode. This will also make your notebook lighter by about 700kB.

Using ITables for specific tables only#

If you prefer to render only certain series or dataframes using itables, then call init_notebook_mode(all_interactive=False) then show:

from itables import show

show(df, lengthMenu=[2, 5, 10, 25, 50, 100, 250])
region country capital longitude latitude
Loading... (need help?)

Try ITables on Binder#

You can run our examples notebooks directly on Lab, without having to install anything on your side.