State Save

State Save#

To preserve the table state, like the selected columns or the row order you can use the stateSave option. This will preserve the table state when the page is reloaded, or when an ITable component is updated.

Tip

You might also want to adjust stateDuration which defaults to 2 hours.

Try the option on this page: re-order the table by clicking on one column, then refresh the page - the order will be preserved.

import itables

itables.init_notebook_mode()

df = itables.sample_dfs.get_countries(html=False)

itables.show(df, stateSave=True)
Loading ITables v2.4.0rc1 from the init_notebook_mode cell... (need help?)