I am not looking for ready made code, I am just curios if the streamlit library has the capability to collape/expand some rows based on an identifier.
My data consists of multiple rows with entries that detail purchases of an item at different price points and dates. I want to see a “summarize” row that consists of a sum of all item quantities and an average or the purchase price - this row I can create through python or maybe streamlit could create it automatically. Once I have this row, if I click it I want to see all item purchases, then if I click it again I want to see just the summarize row.
My question is: is there such a capability built in streamlit and if it is can you please tell me what I should look into?
You would need to handle the logic yourself as there aren’t built-in summarizing features like that. If I were to make something as you describe I’d probably put together the following pieces:
Based on the output of st.data_editor, I’d gather the additional data into one or more st.dataframe displays below it.
I’m not deeply familiar with streamlit_aggrid which is an add-on for Streamlit. I think it has some ability to do a summary row, but I’m not sure if it will serve your use case. Still, you might check that out.