Hedi1
October 21, 2025, 4:19pm
1
Hello, I was trying to use the new st.column_config.MultiselectColumn component, it works well as used in the demo code. However when you try to use it with with an empty dataframe (only columns names) for the “data’ parameter in the st.data_editor function it looks like the selected values for the multiselect are not saved.
The code:
data_df = pd.DataFrame(
columns=\[
“category”, “test”
\]
)
st.write(‘The editable dataframe:’)
edited_data = st.data_editor(
data_df,
num_rows="dynamic",
column_config={
“test”: st.column_config.TextColumn(‘test’),
“category”: st.column_config.MultiselectColumn(
“App Categories”,
help="The categories of the app",
options=\[
“exploration”,
“visualization”,
“llm”,
\],
),
},
)
st.write(‘Print of the editable dataframe after modification:’)
st.write(edited_data)
Results:
This behavior only apply to the Multiselect. Other type are working well
Summary
This text will be hidden
Hello @Hedi1 ,
In fact it raise an error in
.venv/lib/python3.13/site-packages/streamlit/elements/widgets/data_editor.py at line 216:
commenting the error and writing “pass”, your code works
Maybe you should report this as a bug.
Have a nice week-end.
Jp
Hedi1
October 25, 2025, 9:00am
3
Hello @Jean_Pierre ,
Thanks for your help, I did report it. Feel free to add your solution to help streamlit devs:
opened 01:13PM - 21 Oct 25 UTC
type:bug
status:confirmed
priority:P2
feature:st.data_editor
### Checklist
- [x] I have searched the [existing issues](https://github.com/st… reamlit/streamlit/issues) for similar issues.
- [x] I added a very descriptive title to this issue.
- [x] I have provided sufficient information below to help reproduce this issue.
### Summary
Streamlit version: 1.50.0
Python version: 3.11
Hello, I was trying to use the new st.column_config.MultiselectColumn component. However when you try to use it with with an empty dataframe (only columns names) for the “data’ parameter in the st.data_editor function it looks like the selected values for the multiselect are not saved.
### Reproducible Code Example
```Python
import pandas as pd
import streamlit as st
data_df = pd.DataFrame(
columns=[
"category", "test"
]
)
edited_data = st.data_editor(
data_df,
num_rows="dynamic",
column_config={
"test": st.column_config.TextColumn('test'),
"category": st.column_config.MultiselectColumn(
"App Categories",
help="The categories of the app",
options=[
"exploration",
"visualization",
"llm",
],
),
},
)
st.write(edited_data)
```
### Steps To Reproduce
1. Edit the "category" column of the dataframe
2. Observe no change on the printed value of the edited dataframe for the "category" column
### Expected Behavior
Expected behavior is to get the selected options saved in the edited_data variable. Like other column type (text, selectbox...)
### Current Behavior
Currently, when the data is initially empty on st.data_editor, modifications on MultiselectColumn are not saved
### Is this a regression?
- [ ] Yes, this used to work in a previous version.
### Debug info
- Streamlit version: 1.50
- Python version: 3.11
- Operating System: MacOs
- Browser: Chrome
### Additional Information
<img width="1533" height="290" alt="Image" src="https://github.com/user-attachments/assets/e2fb1260-9112-45e7-b785-5c5368a4b036" />
1 Like