Streamlit aggrid changing dynamically

Hello,
I am trying to use streamlit aggrid to display a dataframe with specific column values first, then run a function to change column values on the same dataframe and have streamlit aggrid show the new column values (same headers). ie refreshing streamlit aggrid after changing a column value.
is this possible? and how to do it.
my code snippet is below.
Thank you for your assistance.
Gerard

st.session_state._df = pd.DataFrame({"A" : ["John","Deep","Julia","Kate","Sandy"],
                     "MonthSales" : [25,30,35,40,45]})

gb = GridOptionsBuilder.from_dataframe(st.session_state._df)

grid_options = gb.build()

st.session_state._df = pd.DataFrame({"A" : ["John","hanna","Julia","Kate","Sandy"],
                     "MonthSales" : [25,30,35,40,45]})


grid_response = AgGrid(
    st.session_state._df,
    gridOptions=grid_options,
    data_return_mode=DataReturnMode.AS_INPUT,
    update_mode=GridUpdateMode.VALUE_CHANGED,
    fit_columns_on_grid_load=True,
    theme='streamlit',
    enable_enterprise_modules=False,
    height=350,
    width='100%',
    reload_data=False,
    allow_unsafe_jscode=True
)


#changed John to Carl and wanted same aggrid showing the changes 
st.session_state._df = pd.DataFrame({"A" : ["Carl","hanna","Julia","Kate","Sandy"],
                     "MonthSales" : [25,30,35,40,45]})

I have the same issue

I tried:

  1. Replacing dataframe with another data frame it give an exception
    streamlit.errors.DuplicateWidgetID: There are multiple widgets with the same key='userTable'
  2. Passing update_mode=“MODEL_CHANGED” to AgGrid constructor
    no changes (and update_on=[‘MODEL_CHANGED’])
  3. doing
user_df.data = pandas.DataFrame(data.ui_users)

no changes either

Solution which actually worked:
create aggrid instance with

return AgGrid(dataframe, gridOptions=gb.build(), key=st_key, reload_data=True)