Giter Site home page Giter Site logo

Code export about pandasgui HOT 4 CLOSED

adamerose avatar adamerose commented on July 17, 2024 2
Code export

from pandasgui.

Comments (4)

adamerose avatar adamerose commented on July 17, 2024 7

Yeah this is on the feature tracker list but good to have an issue for it since it's a high priority feature. Aiming to get this one done by December

from pandasgui.

adamerose avatar adamerose commented on July 17, 2024 1

Thank you very much for this feature !
Especially for pivot, it helps to know how to do them by code.
I think the filter commands should also be pushed in the log, I don't see them.
Thanks again, PandasGUI is awesome !

Currently filters should always appear at the end of the log, not in the same order you apply them. Or do you not see it at all?

image

I did it like this because in PandasGUI filters are transient (they can be enabled/disabled) and the way this works under the hood is an unfiltered df is always stored and that is what modifications like cell edits and column sorts are applied to, and the filters are reapplied to it after any change. Otherwise filters would not be toggleable because you can't undo a filter unless you have the original.

So I had two options for the code history...

  1. Duplicate this logic in the code history, so there would be two df objects at each step df and df_filtered and filter state would be stored in a list of objects with properties for the query string, enabled state, and failed state.
  2. Apply filters at the end simply as query strings with a snapshot of the current enabled non-failed filters. The problem with this is that if you create derived DataFrames or plots using Reshaper or Grapher, they will always be applied to the unfiltered data so you'd need to reorder the code to apply the proper filters beforehand.

I went with option 2 since it keeps the output much cleaner and it is easy to rearrange or copy paste the filters where you want them.

from pandasgui.

adamerose avatar adamerose commented on July 17, 2024

Ok I added code history on dev branch. Try it out and let me know if you have any issues or feedback then I'll put a release on PyPi

@adammclaurin @broberg @santiariza15 @Krogenar @supernooba @am-technix @ardasamet0 @chottokun (pinging the people who upvoted)

from pandasgui.

am-technix avatar am-technix commented on July 17, 2024

Thank you very much for this feature !
Especially for pivot, it helps to know how to do them by code.
I think the filter commands should also be pushed in the log, I don't see them.
Thanks again, PandasGUI is awesome !

from pandasgui.

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.