Session State_Selectbox_Multiselect

Summary

I’m trying to set my multiselect to capture what is what I have in my selectbox. I have my multiselect in my main.py and the other in test.py.

Steps to reproduce

main.py
filter_checkbox = st.sidebar.checkbox(“Filter (to exclude values)”,key=“checkbox3”)
normalize_checkbox = st.sidebar.checkbox(“Normalization (for quantitative values)”, key=“checkbox1”)
transform_checkbox = st.sidebar.checkbox(“Transformation (for categorical values)”, key=“checkbox2”)

        if filter_checkbox or normalize_checkbox or transform_checkbox:
            if filter_checkbox:
                df_final = filter_columns(df_final, filter_checkbox)
                
            if transform_checkbox:
                # Select categorical columns
                cat_cols = df.select_dtypes(include=['object', 'category']).columns.tolist()
                selected_cols = st.multiselect("Select which categorical column/s to transform:", cat_cols)

test.py
independent_column_name = st.sidebar.selectbox(“:four: SELECT THE ‘x’ FIELD (independent variable):”, column_names, key=‘anova_column’)

Hi @kingTwerk

Thanks for the code snippet, however to allow the community to reproduce the error, it would be great if you could share a link to the GitHub repo of the app.

Also, from the post, it was unclear whether there was an error in particular that you had encountered and need help with?

Best regards,
Chanin

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.