Creating interactive table with input elements

Hi there,

I am working on a project and I wanted to create a table from pandas.DataFrame that would not only display the data but also provide input fields or dropdowns for users.
Each row should contain a couple of input elements. Later, the contents of the input elements are going to be inserted into the database.

Iโ€™ve read the documentation and tried st.table and st.dataframe, but they do not provide the opportunity for adding input elements into the table. Also tried to create a table, where each dataframe column is a separate st.column, but this approach is not visually acceptable.

So my question is whether there is a workaround to get each row to have such input fields?

Thank you for answering!

Hi @RancidSpring,

Have a look at these 2 links:


Thank you @Shawn_Pereira for answering! This is helpful, but not exactly what I was looking for. The problem is to have such input elements for each row of a DataFrame (visually aligned with the row). So that only some of the attributes can be set by user, other attributes are pre-defined.

Maybe there is a component, that provides such functionality?

Thank you again for helping!

In that case @RancidSpring , the only other option available is Ag Grid (GitHub - PablocFonseca/streamlit-aggrid: Implementation of Ag-Grid component for Streamlit). If you search this forum, there are examples on how to include images, dropdowns, etc.


1 Like

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