How to evolve complex state (e.g., annotate data)?

To elaborate, ignore_hash=True lets you create mutable state. For example:

import streamlit as st

@st.cache(ignore_hash=True)
def get_state():
  return []

state = get_state()
state.append(len(state))
st.write(state)
st.button('Rerun')

Every time you run this script it appends a element to the state:

image

I also responded to your partial cache function in the other thread.

Thanks for all the great questions and happy app creating!! :slight_smile: