Hi @rohit_somani,
First let me welcome you to the Streamlit Community!
We are currently developing a programmable state that will make this easier, but it has not launched yet! However, many others in the community have made some workarounds for this that you may find helpful. I have added some links below:
Multi-page app with session state
Alternative implementation of session state
To me based on you code snippet, it looks like you are using a pandas dataframe and your wanting to change the names of some columns based on the text_input
and value
, is that correct?
Iβm not entirely sure that this will do as a work around, but in the past I have been able to pickle changed files and load the new updated file into my streamlit app to get around the re-running of the script. Now if this is a large data set then you may not want to reload every time, but you might be able to pickle just the names of the columns and update those names in your database every time the user changes a column name.
Good luck and Happy Streamlit-ing!
Marisa