Hi all !
Is there by any chance a way to retrieve the user’s sort of dataframe editor ?
My current issue is:
1- the user sorts a dataframe editor then edits a cell
2- after various session state callbacks, the dataframe editor is correctly updated but the order of the dataframe is reset to its initial state
What I’d like to do:
1- the user sorts a dataframe editor then edits a cell
2- after various session state callbacks, the dataframe editor is correctly updated and the order of the dataframe is the same as the user had prior.
My initial idea was to store the index of the sorted dataframe, then after the callbacks, sorting the df using the saved order. But, is that correct to assume that the sorting of the df editor does not has any impact on the underlying pandas df ? And that it is only a UI change ?
How could I solve this issue ? I’m sure that the column chose by the user and the order (ascending/descending) is somewhere. Maybe using a javascript snippet ?
Many thanks.