-
Notifications
You must be signed in to change notification settings - Fork 233
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
Support to add new feature using python #69
Comments
So if I understand, the problem is that you don't like needing to repeatedly call Do you have any specific solution in mind? All I can think of is maybe add a method to add or replace dataframes in an existing GUI window, so you would do |
Not sure if this is a good idea but here is a rough sketch of a proposal: Add an option in the GUI to add a new column by specifying
Basically do something like this:
Though I'm not sure if this still makes sense when filters and sorts are applied. Personally, this behavior still makes sense to me, but maybe there are people who would disagree, and expect the new column to only contain values in the filtered rows? |
Here's an API that might work, it just lets you modify your DataFrame as you normally would and then replace the one in the GUI with your result. I can't think of any limitations with this and it seems easier to work with then the
So an example usage would be like this
Another thing I can do is use my scope sniffing magic (the same thing that get's the dataframe variable name into the GUI as a string) to find all dataframes in your scope and replace the GUI instances with those, you just need to keep the name the same.
|
I'm worried that if this is a recommended workflow, it would not be compatible with editing data in the GUI, since the changes made in the GUI is not synced with the original dataframe. For example, if I run
then change the HP of Bulbasaur to 200 in the GUI, I would expect Bulbasaur to show up after executing
|
Yeah you'll always need a method call to sync in either direction, because I don't want to automatically overwrite the original DataFrame due to reasons in the thread I linked. So have Your example would look like this
This is the least verbose API I can think of |
Just thought of another idea: Provide an IPython magic command to wrap this together. For the example above, allow the user to instead do something like
This could also make the history-tracking better, since both GUI operations and magic commands can be recorded. |
When I try to EDA, I usually create some new features to help me to analysis data.
For example, some columns has missing data, creating a new columns using 1 or 0 to identify that columns has missing or not.
I don't want to turn off the pandasgui, creating new column, show pandasgui again. This is complex
The text was updated successfully, but these errors were encountered: