I guess the style.applymap
doesn’t work with the editable dataframe!!
Hi All, really great to finally see this feature!
I’m wondering if the ability to drag to reorder rows is in the pipeline? I know this is is possible with Glide Data Grid (as are many other features… ), and it would be very helpful for one particular use case I have. I use AG Grid for many applications, but being able to use the editable data grid in Streamlit natively would be more responsive in this case!
Thanks!
I’m currently investigating this issue and I hope there will be a fix in the next version (1.21).
We plan to add various ways that allow limiting what kind of data the user can provide. E.g. for number columns we will probably allow to define a min and/or max value. So you don’t even have to think about validation that.
But for very specific validations, you still might need to write some custom logic. It should be possible to do that with the edits from the session state,. but it probably is quite complex to do that. If I find some time I can write up an example.
They are already implemented. But we are still iterating on the API to activate different columns. But I expect that it will be released soon.
Reordering rows is something we maybe do anywhere in the future. But we don’t have it scheduled on our roadmap yet. So don’t expect it to come out anytime soon You could create it as an enhancement request on Github and gather some support for this issue, this might help to prioritize it.
The doc page mentioned that
No need to compare the old and new dataframe to get the difference. Just use
st.experimental_data_editor
together with session state to access all edits, additions, and deletions.
Can anyone please explain a little bit more about how to get the changes in order to update the data in database?
That is the announcement, not the documentation. The actual documentation page on dataframes (linked in the announcement) has a section dedicated to getting the changed data, including sample code.