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(“ SELECT THE ‘x’ FIELD (independent variable):”, column_names, key=‘anova_column’)