St dataframe column config CheckboxColumn issues

Hi guys,
Having trouble using the column config checkboxcolumn with streamlit, and when it does seem to appear in the column, the box is not even clickable. I am running streamlit 1.31.

If this function does not work properly, is there a way to select rows in a dataframe whilst keeping a styler active, or expand rows/display further information for selected rows? I have looked at streamlit-aggrid and streamlit-material-ui but they both do not support pandas stylers. I have a heatmap which is imperative to my data visualisation.

Help would be greatly appreciated, been stuck on this for months now. Thank you

my code:

Display each CSV file as a table

for csv_name, csv_df in csv_dict.items():
if chosen_type in csv_name:
with home_team_tab:
if home_team in csv_name:
df = csv_df.sort_values(by=[โ€˜Disposalsโ€™], ascending=False)
st.dataframe({โ€œDisposalsโ€: โ€œ{:.2f}โ€, โ€œGoalsโ€: โ€œ{:.2f}โ€, โ€œBehindsโ€: โ€œ{:.2f}โ€,
โ€œFrees Forโ€: โ€œ{:.2f}โ€}).background_gradient(axis=0, cmap=cmap), column_config={โ€œ_indexโ€: st.column_config.CheckboxColumn()},
height=600, use_container_width=True)

st.dataframe is only for display, you cannot interactively change the displayed values. Maybe you want st.data_editor() instead.

1 Like