Supported Notebook Editors#
itables
has been tested in many development environments.
Jupyter Notebook#
Jupyter Lab#
Jupyter NB convert#
The tables are still interactive when you download the notebook as an HTML file, or when you execute jupyter nbconvert --to html
.
Jupyter Book#
The tables are interactive in interactive books powered by Jupyter Book, see e.g. the ITables documentation.
Google Colab#
A short sample notebook is available here
VS Code#
In VS Code, itables
works both for Jupyter Notebooks and Python scripts
PyCharm#
In PyCharm we recommend to call init_notebook_mode
with the connected=True
argument,
because otherwise the notebooks do not display the interactive tables when they are reloaded.
Exporting a DataFrame to an HTML table#
To get the HTML representation of a Pandas DataFrame df
as an interactive datatable, you can use to_html_datatable
as below:
from itables import to_html_datatable
from itables.sample_dfs import get_countries
df = get_countries()
html = to_html_datatable(df)
Using ITables in Shiny#
You can use ITables in Web applications generated with Shiny for Python with e.g.
from shiny import ui
from itables.shiny import DT
ui.HTML(DT(df))
See also our tested examples.
ITables won’t work in Dash because jQuery is not usable in Dash (see the Dash FAQ).