st.data_editor displays tabular or collection data in an editable, spreadsheet-like widget. Pass initial data to it, then use the returned value as the user's current edits. section 9.7.1 section 9.8
Edit game settings
A settings table can let players choose a quizmaster and difficulty. Use num_rows='fixed' when the application needs exactly one settings row: settings = st.data_editor(default_settings, num_rows='fixed', key='settings_editor'). Before interaction, settings matches default_settings; after an edit, it contains the changed dataframe across reruns. section 9.7.1
Configure the editor around the application's constraints:
- Set num_rows='fixed' to prevent users from adding rows when each setting should have one value. section 9.7.1
- Give the widget a key so it is represented in session state and protected from a Streamlit widget-state quirk. section 9.7.1
