We have an st.dataframe where users can select rows from the table.
Whenever users come back to the page from another page, we want to set the selected rows of the st.dataframe and display them on the page.
Below is the code, but there is no doc on how to do that
import numpy as np
df = pd.DataFrame(
np.array([['a1','b1'],['a2','b2']]), columns=["a", "b"]
)
st.dataframe(
df,
on_select="rerun",
selection_mode=["multi-row"],
)
any idea?