Classes#
Select how your table looks like with the classes argument (defaults to "display nowrap") of the show function, or by changing itables.options.classes.
Add "compact" if you want a denser table:
import itables
itables.init_notebook_mode()
df = itables.sample_dfs.get_countries()
itables.show(df, classes="display nowrap compact")
Remove "nowrap" if you want the cell content to be wrapped:
itables.show(df, classes="display")
Loading ITables v2.5.2 from the init_notebook_mode cell...
(need help?) |
More options like "cell-border" are available:
itables.show(df, classes="display nowrap cell-border")
Loading ITables v2.5.2 from the init_notebook_mode cell...
(need help?) |
Tip
You can change the default for all your notebooks and apps by creating an itables.toml configuration file in the current or a parent directory, with e.g. this content:
classes = ["display", "nowrap", "compact"]