Drop down list in Table

HI ,

I am new to streamlit (and Python for that matter) . I am looking to create a table which has a drop down selection box within it like that pictured below

Is this possible within Streamlit?

all guidance appreciated

If you want to follow your logic path, the way to do it is:

  1. Create 3 columns using st.columns
  2. Write the headers for each columns
  3. For the data rows (in each column), you can use st.selectbox in a loop for the number of rows you want.

However, I suggest this method:

  1. Create a 1 row x 3 columns using st.columns in a form. In each column, put your st.selectbox with its related options
  2. Create an empty pandas dataframe with 3 columns below this row (mentioned in the above point)
  3. Every time you update the form with new data, you can programmatically add the data to a new pandas row

Cheers