How to use data_editor with column list in dataframe

I have a dataframe in my local streamlit app wich I have columns with a range value like column_a = [1,2]. Does the lib data_editor support this type of data?

import pandas as pd
import streamlit as st

data = [
{
“score_range”: [100,200],
“comp_range”: ,
“id”:0
}
]

df = pd.DataFrame(data)

edited_df = st.data_editor(df, num_rows=“dynamic”, hide_index=False)

Running this application I’m not being able to edit the range columns in the interface. Is there any solutions for this case?

Hey @Renan_Nogueira ! Welcome back. Super appreciate this post!

The big challenge will be asking whether to edit the range.

The only column config we officially support is ListColumn, but it is not editable by default :frowning:

You could try using a TextColumn config and provide the validate parameter and handle the translation to range back in the script. Less ideal, but I think it makes the most sense.

Hope that helps!