Get help from the marimo community

Updated 2 months ago

Data editor

At a glance

The community member is asking if it's possible to have a data frame with a column that has editable cells and another column that updates automatically based on the editable values. The df.value function only displays the values but doesn't allow editing.

In the comments, a community member suggests creating an editable data frame for the single column and then using mo.hstack([editable_column, other_column]) to combine it with the other column. Another community member adds that this would likely require multiple cells: one to create the editable column, another to create the other column based on the editable column's values, and a third cell for presentation.

There is no explicitly marked answer in the provided information.

Hello, I've just discovered the experimental data editor function. I'm wondering if it's possible to have a data frame that contains a column with editable cells and another column that updates automatically according to these values (this column may or may not be editable)? df.value only displays the values but doesn't allow you to edit the cells.
M
2 comments
it wouldn't look nice, but you could create an editable dataframe of just the single column and then use mo.hstack([editable_column, other_column])
you'd likely need a few cells to do this, the first cell creating the editable_column = mo.ui.editable_dataframe(), a second cell createing other_column from editable_column.value and then the third cell for presentation
Add a reply
Sign up and join the conversation on Discord