Issue with displaying dict type cell values using st.dataframe

Hello Everyone,

I am new to Streamlit and facing issues while working with dataframes.
Use-case : I need to store dict as cell values in dataframe β€˜df’ for column β€˜a’ and string for column β€˜b’. Normally, my code outputs the result as required but somehow when I use the same code on Streamlit using st.dataframe, It merges cell values for the columns that has value type dict.
I have attached the example code below for your reference.
df = pd.DataFrame([[{β€˜1’:β€˜2’}, β€˜abc’], [{β€˜6’:β€˜3’}, 'def]], columns= [β€˜a’,β€˜b’])

Expected output:
output1

Output using st.dataframe():

Could someone help me out on this?.
Thanks in advance.

Hey @nikita,

I am able to reproduce this exact error on my computer too! Can you please file a GitHub issue on this and add your code line in?

Thanks for the catch! :softball:
Happy Streamlit-ing!
Marisa

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