I am trying to set up a dataframe with selectable rows using st.dataframe’s on_select and the callable option.
selection = st.dataframe(
projects_df,
use_container_width=True,
hide_index=True,
selection_mode="single-row",
on_select=handle_selection_change
)
According to the document:
A callable: Streamlit will rerun the app and execute the callable as a callback function before the rest of the app. In this case, st.dataframe will return the selection data as a dictionary.
When it calls my function, how does the return value of st.dataframe get to my function?