JayJ
JayJ4w ago

For the table widget, can we rename the column labels?

I am going through the documentation of the table element, and I am wondering can the column label be renamed? Or we must do that in a dictionary object first?
Solution:
i would change it from the data you have before passing it into mo.ui.table
Jump to solution
5 Replies
Solution
Myles Scolnick
i would change it from the data you have before passing it into mo.ui.table
Akshay
Akshay4w ago
That could potentially be something we one day add to ui.experimental_data_editor if there is sufficient interest?
No description
JayJ
JayJOP4w ago
I think the data editor and table element might be redundant. Can the add row be a method? table.add_row() or table.add_rows(). For the editing, can it be control with read_only flag? Having the need to convert a dataset to a dataframe just so the table labels can be modify seems like an extra step (and overhead) in some use cases. This is just a personal opinion.
Myles Scolnick
You don't need to convert it to a dataframe, you can keep it as a dictionary - i just found it easier since the util to rename is already there.