Supported Notebook Editors#
itables has been tested in many development environments.
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.
A short sample notebook is available here
In VS Code,
itables works both for Jupyter Notebooks and Python scripts
In PyCharm we recommend to call
init_notebook_mode with the
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).