Notebook Mode#
Activate ITables in a Jupyter environment for all your tables with init_notebook_mode:
import itables
itables.init_notebook_mode()
You can go back to the standard HTML representation of Pandas DataFrames with init_notebook_mode(all_interactive=False).
df = itables.sample_dfs.get_countries()
df
Loading ITables v2.5.2 from the init_notebook_mode cell...
(need help?) |
Note that the init_connected_mode function also activates ITable’s offline mode, unless you call it with a connected=False argument.
Offline mode#
By default init_connected_mode configures ITables to work offline (except in Colab). No internet connection is required as the JavaScript code is embedded into the notebook itself when you execute init_notebook_mode.
In some contexts (Jupyter Book, Google 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 900kB. Note that, in Google Colab, connected=True is the only working option.
Show#
If you prefer to render only certain tables using itables, or want to set additional options, use show:
itables.show(df, caption="A DataFrame rendered with ITables")
Loading ITables v2.5.2 from the init_notebook_mode cell...
(need help?) |