'None' as an option in st.column_config.SelectboxColumn

st.column_config.selectboxColumn can take an iterable and provide those elements as input options in column of a data editor.
Now, i have an app that takes the values of a column given input through st.column_config.SelectboxColumn and send them as keys to a dictionary. but
apart from the value in iterable, st.column_config.SelectboxColumn is adding extra ‘None’ into the selectable options. it is not happening in demo app of st.column_config.selectboxColumn official documention

in my pc and in streamlit cloud :
Streamlit, version 1.25.0
Python 3.10.8

in official documentation app :

i couldn’t figure out the solution here.
addition of ‘None’ to options intended ?
bug in streamlit?
update my python ? ( but same happening in streamlit cloud too i assume it is using latest version of python)

Hey @R_Y,

Thanks for sharing your question!

Are you able to also share a code snippet so we can reproduce this issue?

There’s one missing line from the code in the docs, which is required=True – if you add that in the column config (see the actual source code https://github.com/streamlit/docs/blob/main/python/api-examples-source/data.selectbox_column.py), it will not have None as an option.

We’ll get that updated in the docs.

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