Data_editor Questions

Hi,

  1. How can I insert (not add) rows from within the data_editor (with dynamic rows)? If yes, will I have the inserted_rows key available?
    tmpdepix

  2. Can we have an insert icon next to the circled icon in the above picture for inserting records at the selection point in the data editor?

  3. Like the circled icon, is it possible to also attach custom icons and assign them to functions?

Thanks in advance.

Hey @Shawn_Pereira!
To 1. Do you mean inserting it from Python-side or via a UI interaction? If from Python side, I think you should be able to just modify the (Pandas) dataframe (insert there) and pass the modified dataframe to the data_editor command. Maybe @lukasmasuch has a better idea.

To 2. Right now we don’t support customizing the toolbar. We have thought about it, but don’t have any concrete plans yet. The best action right now would be too open an issue on GitHub and upvote it :slight_smile:

To 3. Similar to answer 2! I once built a prototype that allowed doing this, but we have not seriously started to look into this feature.

Hi @raethlein

Thanks for the quick response.

To 1: I meant this via UI interaction, through the data editor only. It would be so much more elegant and painless.
To 2: Will put an entry on Github.
To 3: It you built a working prototype, then Streamlit should ideally consider adding this. It would provide the flexibility to do so much more with Streamlit.

Cheers

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.