How to refresh calculated item total using st.data_editor

Local app on windows laptop with python 3.11 pandas 2.3, and streamlit 1.36

I’m loading a pandas dataframe using st.data_editor. I have 2 issues:

1.The dataframe has cost, quantity, and item totals for each record. I want to update quantity and see item total update for each record. Can’t find an example of this. Have tried using on_key, on_change, and fugly brute force. The date looks like items on an invoice. Because that’s what it is.

  1. The same dataframe has validation criteria for each row, but I can’t figure out how to access the values for each record based on index name and column name for each row other than dynamically generating column_config. Is there an example of this or is there a better way.

Apologies for lack of code but I my laptop blocks this site because who needs to share code, right? So I have to post from my phone which doesn’t have the code.