Coder Social home page Coder Social logo

Upcoming v1.0.0 about dfply HOT 6 CLOSED

kieferk avatar kieferk commented on August 19, 2024 1
Upcoming v1.0.0

from dfply.

Comments (6)

Make42 avatar Make42 commented on August 19, 2024 7

Since you are changed quite a bit anyway for 1.0.0, maybe you can consider to use filter (as in dplyr) instead of mask? I am not sure why you deviated in this particular case, while kept to the verbs of dplyr otherwise.

Also: Could you include the option to filter based on the index?

FInally: Do you have an estimate for when the 1.0.0 version will come out?

from dfply.

jankatins avatar jankatins commented on August 19, 2024

just some food for thought from adding a small verb in tidr and what I liked about the dplyr/tidr implementation:

  • The extensibility of single dispatch (=S3 system in R, @singledispatch in python) to make the functions work with different inputs. Instead of doing if instanceof(input, Series): ... elif instanceof(input, GroupBy): ... else raise Error() you write a simple base functions which just raises NotImplementedError and decorate is with @singledispatch and then add the rest of the functions for Series, GroupBy and so on. Extending the system for SQL backends is then "only" adding a functions for suitable wrapper around a SQL connection. I wrote a small protoype for it and still want to try it in dfply.
  • The strict split between "Non-standard-evaluation" (NSE -> all normal dplyr functions) and the SE variants (the functions with underscore), where the later are for "programming" and the former for "interactive" work (see https://cran.r-project.org/web/packages/dplyr/vignettes/nse.html). In the python world, it basically translates to: NSE functions do the stuff to get a list of columns and then call the SE functions with that list of columns. IMO the split of the decorator between "do all the work to get the list of columns" and the step of doing something with that list of columns made sense as it lets you "opt in" to some features: I like composability by explictly adding a decorator or (IMO even better) by calling a function.

from dfply.

kieferk avatar kieferk commented on August 19, 2024

I like both of those. I was trying to do something similar to the@singledispatch thing you're talking about with the new TypeAction class, but this sounds better in many ways. I will check out your prototype. I'll also see if it would be easy to put the non-standard evaluation functions in and redesign the internals to mimic this kind of functionality. Thanks for the tips!

from dfply.

kieferk avatar kieferk commented on August 19, 2024

@JanSchulz I read over these and I definitely like the singledispatch/registration pattern for these verbs. I think this is a more elegant solution to the one I was building towards.

Maybe I'm being overly optimistic but I think that I could change the base code that deals with piping to fit into this framework without a huge amount of hassle. I just need to make sure it all plays nice with the symbolic X. Right now i have the selection helpers working in the feature/collapsed-selection branch, which was tricky to get working correctly. Not sure how it will go down with this setup until I test things out.

Regardless, I think your suggested pattern is the way to go because it is readable and easy to extend. With the winter holidays coming up in a week or two I am going to use that free time to try and change the implementation to match what you've laid out in your blog post.

from dfply.

Make42 avatar Make42 commented on August 19, 2024

Is 1.0.0 abandoned? Or why did you close the topic?

from dfply.

sharpe5 avatar sharpe5 commented on August 19, 2024

I'm also keen to know!

from dfply.

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.