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

Export pandas equivalent code for a particular transformation? #33

Open
psychemedia opened this issue Dec 3, 2017 · 1 comment
Open

Comments

@psychemedia
Copy link
Contributor

One of the things the pivot table gadget is good for is helping novices get a feel for reshaping a dataset and looking at the output from a particular transformation.

I would be really handy to be able to export he pandas equivalent code for a transformation so it could be applied directly to the pandas dataframe that feeds the pivot_table in the parent notebook.

I can think of one corollary to this - the jigsaw magic embeds an HTML blockly code editor and optionally allows the exporting of code equivalent to the program in the editor into a code cell created beneath the widget.

It would be handy if jupyter_pivottablejs could do something similar, by exporting pandas code equivalent to the transformation operation applied in the pivottable, if not the visualisation.

@nicolaskruchten
Copy link
Owner

I agree this would be nice, but there isn't really a nice one-to-one correspondence between PivotTable.js' output and pandas code, for example anything to do with graphics, and the various aggregators. Mimicking the state of the filter menus would also be a challenge to generate succint python code, unfortunately.

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