Output widget disappears as soon as other widget is used

The df disappears as soon as I select something in the multiselect. Why is that? Is there a way to keep the df displayed the entire time?

if st.button("Read Data"):
        df = pd.read_csv('test.csv').set_index('Guideline')
        df
disagree = st.sidebar.multiselect(
         'Select the guidelines for which you disagree with our evaluation',
         ['Structure', 'Circular', 'Examples', 'Intensional', 'Conciseness',
          'Negative', 'Subdefinitions', 'Overall'],
         [])

The above is a simplified version of what I am trying to do. In the real app the first part is actually displaying the results of an API call rather than just reading a csv file, hence I need a button to execute the API call first.

This is because when a button is clicked once, it returns true during the first rerun of the script.
During the second rerun when you interact with some other widget, the button click returns false since it’s not clicked during the second rerun.

One solution would be to use session states to remember button clicks, and probably another button to clear that state. This should help with session states: