Relative Content

Tag Archive for pythonstreamlit

Remove rows in your dataframe with filling option in streamlit

I’m currently creating a streamlit app that shows the results of user’s inputs. It may happen that the user accidentally submitted its results. So I want the user to allow removing its values in the dataframe. The most similar option I found was this Deleting rows in st.data_editor progmatically, which uses a callback function to remove the rows. Unfortunately, it only works on the first row of the dataframe but it removes the complete dataset. Also, it doesn’t work on the latter rows. Here is some reproducible example:

How to mount the local filesystem with stlite

I’m trying to create an executable from a streamlit app using stlite. I need the app to read and write files on the local filesystem, so I followed these explanations. Even with the example provided here, I always get an error like this:

streamlit st.text_input: value not updating as expected

New to streamlit, this is my issue: I’m trying to provide the user with an interface to annotate some data. For each item the user should give a label and may optionally leave a comment, and they can navigate across the different items with ‘prev’ and ‘next’ buttons. A basic version of the code is here:

Submit results to fill a dataframe in streamlit

I would like to build a streamlit app where the user gives some inputs and every time it uses the form_submit_button button, it will fill a dataframe row by row to collect user data. Currently I have the following app: