Using St. Number Input to Place Values in a Table

Hey everyone,
Iโ€™m trying to make two dataframes in streamlit in snowflake. In one dataframe the user inputs values. In the second dataframe, the values automatically show up under the same column. Would we use st.number_input in some way to do this functionality?

Hi @st.jfern

You can use st.data_editor to both display and make direct edits to the data. If youโ€™d like to duplicate the dataframe, you could use the copy() method of Pandas as in df.copy() to create a copy of a dataframe to create a second display st.dataframe(df.copy())

Hereโ€™s the Docs page of st.data_editor which has several code snippet examples.

Hope this helps!

st.data_editor doesnโ€™t become effective until next version though correct. The current working function would be st.experimental_data_editor right? How would you format for that?

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