Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access Altered DF Results (after filtering, sorting, etc.) #858

Closed
eunosm3 opened this issue Apr 17, 2024 · 2 comments
Closed

Access Altered DF Results (after filtering, sorting, etc.) #858

eunosm3 opened this issue Apr 17, 2024 · 2 comments

Comments

@eunosm3
Copy link

eunosm3 commented Apr 17, 2024

Does D-Tale provide a method to access the results of a filtered/sorted/altered DF? For instance, if you sort by column X, filter by a value range and then add a column, is it possible to access those results in another cell using code like dtale.show(updatedDF, ...), etc.?

@aschonfeld
Copy link
Collaborator

aschonfeld commented Apr 25, 2024

So you can access the underlying data w/ any edits & sorting you've made, but no filtering. An example is this:

d = dtale.show(df)

#make some edits or add some columns using the UI

d.data  # this should return a dataframe with those edits

I'm going to add another property called view_data which will include any filtering

@aschonfeld
Copy link
Collaborator

@eunosm3 this update has been included in v3.12.0 which has just been released to pypi (soon to be on conda-forge as well). So to get the filtered data simply do something like

d = dtale.show(df)
d.view_data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants