I am wondering if it is possible for having interdependency for the columns in experimental_data_editor.
For the below toy example, I want to make the food displayed according to what category the user edits to in the category column. For example, if the user edits the dataframe and makes the category as dog, then the food column only shows one of [“Bones”, “Dog Food”,…] (this would be a select box) for things related to dog.
df = pd.DataFrame(
{"Category": ["Cat", "Dog"], "Food": ["Fish", "Bones"], "Weight": [38, 27]}
)
df["Category"] = (
df["Category"].astype("category").cat.add_categories(["Golden Fish", "Zebra"])
)
And user would be allowed to make changes / add new rows.
If this is not the best approach to go, please advice how could I achieve this, as I tried using forms however it is not working due to interdependency,
Thanks for help.