Sync modifications in GUI to iPython & record history
See original GitHub issueI noticed that you’re looking for feedback… and I think this project is on to something…
My dream DataFrame viewer would work like this:
from pandasgui import DataFrameViewer
viewer = DataFrameViewer()
viewer.open() # opens a GUI window
viewer.bind(df1) # tab 1 in the viewer
viewer.bind(df2) # tab 2 in the viewer
viewer.bind(df3) # tab 3 in the viewer
Now when you change a cell value in the GUI, the application “pushes” the code to the python/ipython shell i.e., you see df1.at['row', 'col'] = 10
in the shell.
Moreover, if you type df1.at['row', 'col'] = 20
in the shell, the value automatically changes in the GUI. I think such an application would be 1000+ Github stars in no time.
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Sync modifications in GUI to iPython & record history · Issue #20
It would be. The idea is that you can edit cells/columns/rows in the GUI and those commands would be "recorded" in iPython. ......
Read more >How to log IPython history to text file? - Stack Overflow
You can export all of your history in IPython to a text file with the %history magic like this: %history -g -f filename....
Read more >Built-in magic commands — IPython 8.7.0 documentation
By default, the 'processed' history is used, so that magics are loaded in their transformed version to valid Python. If this option is...
Read more >Introduction to IPython configuration - documentation
The IPython directory IPython stores its files—config, command history and extensions—in the directory ~/. ipython/ by default. If set, this environment ...
Read more >Jupyter Notebook files - GitLab Docs
Jupyter Notebook (previously, IPython Notebook) files are used for interactive computing in many fields. They contain a complete record of the user's ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The part that actually applies the filters is just a loop with
df = df.query(filt.expr)
, that method does the parsing and applying the operations. It happens instore.py
like this:And those
@track_history
decorated methods will show up in the history like thisSo I’m already storing a history of these methods and arguments, it’s just going beyond this and being able to generate runnable code is where things get tricky, since these methods often reference
self
or the data store which wouldn’t exist in a user’s scriptDoes not have to bu runnable code. Can be a just a function or method as long as it allows to convenietnly reproduce the processed data frame. If you are open to commits I could look into creating a convenient way to reapply to filters from history.