What are the arguments that are passed to the on_change function in st.data_editor (if any)

The answer to your question is no, for data editor and for any other input widget. You set the actual parameters when calling the widget function, before any interaction happening, so there is no way to pass the updated value as a parameter to the callback.

For most input widgets, if you assign a key then you can use session_state to access the new value in the callback. But, as you probably know already, that is not true for data editor. What you have in session_state is not the updated object but a dictionary with the changes.

You can indeed assign a key to the data editor, what you cannot do is using session_state to set the value for that key, as the error message says.