Not able to edit data in the st.data_editor for data captured via st.multiselect or st_tags

when I run below code and try to display the data captured via st.multiselect or st_tags in data_editor. It becomes non-editable (as highlighted in the attached snapshot).
Is there any way to allow data to be edited?

import streamlit as st
import pandas as pd
options = st.multiselect(
“What are your favorite colors”,
[“Green”, “Yellow”, “Red”, “Blue”])

st.write(“You selected:”, options)

df = pd.DataFrame(
[
{ “Marks”: 40, “selectbox”: True},

   {"Marks": 45, "selectbox": options},

]
)
edited_df = st.data_editor(df)

From the docs:

  • Mixing data types within a column can make the column uneditable.

  • Additionally, the following data types are not yet supported for editing: complex, list, tuple, bytes, bytearray, memoryview, dict, set, frozenset, fractions.Fraction, pandas.Interval, and pandas.Period.

Thanks Goyo, The data is getting rendered fine but it is non-editable even if the data type is uniform like List in this case.
Definitely, What I need is to have support for editing List.
image

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