Coder Social home page Coder Social logo

Export python code about dtale HOT 11 CLOSED

man-group avatar man-group commented on May 23, 2024
Export python code

from dtale.

Comments (11)

aschonfeld avatar aschonfeld commented on May 23, 2024 1

@reza bamboolib has definitely been on my radar (wish it was free :)). I've been discussing how to attack the code export functionality and I think I've got a good idea on how to handle it (at least on the grid side of things. I'll essentially maintain a history of all the operations your running (if the manipulate the data in some way) and you'll be able to view that running log at any time also with the filtering & sorting information at the end.

As for the charts it shouldn't be much harder since isn't really a running history of operations you can perform on the data, just what the inputs allow. The tough part will be figuring out how to get the popup to play nice with plotly/dash.

But its certainly doable and I'll put it at the top of my list. Thanks for the feedback!

from dtale.

aschonfeld avatar aschonfeld commented on May 23, 2024 1

@reza1615 just wanted to give you an update on where I'm at with the code export: https://youtu.be/z95sMY25Ab8

from dtale.

aschonfeld avatar aschonfeld commented on May 23, 2024 1

Not sure why you would want to edit it when you have the "Copy" button right in the bottom of the popup. You can click that and paste it anywhere you want and make edits from there.

Also, don't worry about the dash components. I think I've found a way around it to using the same component for the grid and the charts :)

from dtale.

aschonfeld avatar aschonfeld commented on May 23, 2024

I’ve actually been thinking a lot about that since i’ve developed similar stuff in the past.

I would love to add a dependency on matplotlib so I can export static images but it would require a lot of recoding of the plotly/dash stuff.

Maybe the code snippet is the best way to code so then the users can worry about converting it into a static image.

Great suggestion!

from dtale.

reza1615 avatar reza1615 commented on May 23, 2024

@aschonfeld: bamboolib is a good example for this request take a look on section Getting the Code

from dtale.

reza1615 avatar reza1615 commented on May 23, 2024

For popup in plotly I found https://community.plot.ly/t/any-way-to-create-an-instructions-popout/18828

from dtale.

reza1615 avatar reza1615 commented on May 23, 2024

@aschonfeld: That is great.
Is it possible to keep the code in a text box instead of lable.
To have possiblity to edit or add before copy to clipboard.

from dtale.

reza1615 avatar reza1615 commented on May 23, 2024

I found https://community.plot.ly/t/syntax-highlighted-code-component-type/31035 for sintax highlighting for lable. may we can find some thing for textbox

from dtale.

aschonfeld avatar aschonfeld commented on May 23, 2024

@reza1615 I have just relased version 1.7.11 which includes code snippets. Here's the links you'll find:

  1. in the main menu in the upper lefthand corner a "Code Export" button which houses all of the startup code as well as any new columns added and any sorting & filtering applied
  2. each grid/chart in the Correlations popup has a "Code Snippet" button for the code in (1) plus the code to generate that component
  3. "Code Snippet" button in Histogram popup which takes the output of (1) + all the code to generate the chart and description statistics in the popup
  4. "Code Snippet" in the Describe popup which takes the output of (1) plus the code to generate the statistics displayed for the popup
  5. "Code Snippet" in the Charts page for each chart you generate
  6. dynamic code displayed in the bottom righthand corner of the "Build Column" popup while you make your selections

If you're fine with what you see in this release I'll close this issue.

Thanks

from dtale.

reza1615 avatar reza1615 commented on May 23, 2024

Thanks. I tested that is great.
Is it possible to add syntax highlighting to the code box?

from dtale.

aschonfeld avatar aschonfeld commented on May 23, 2024

@reza1615 just released 1.7.12 with syntax highlighting. Closing

from dtale.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.