Order

Order#

Since ITables v1.3.0, the interactive datatable shows the rows in the same order as the original dataframe.

You can pre-select a explicit order with the order option:

import pandas as pd

import itables

itables.init_notebook_mode()

sorted_df = pd.DataFrame({"a": [2, 1]}, index=pd.Index([1, 2], name="i"))
itables.show(sorted_df, order=[[1, "asc"]])
Loading ITables v2.4.1-dev from the init_notebook_mode cell... (need help?)