Maybe you can use python’s del operator. Will something like this work for you?
table_data = {'Column 1': [1, 2], 'Column 2': [3, 4]}

if st.button('delet dis'):
    del table_data
    st.write('mr button has delet for u')
    
try:
    st.write(pd.DataFrame(data=table_data))
except:
    pass

image1254×290 16.9 KB
image1262×299 16.9 KB