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

a mechanism to specify multiple functions when doing left, right or outer joins #190

Open
simonbyrne opened this issue Oct 4, 2018 · 1 comment

Comments

@simonbyrne
Copy link
Contributor

It would be handy if there was a way to specify different functions when a value is only in one table. e.g. say I want to take the difference of two tables, filling missing values with zeros. One option would be to provide multiple functions, e.g.

join((both=-, leftonly=identity, rightonly=-), lefttable, righttable, how=:outer)

(here the functions in leftonly and rightonly would take a single argument, and both would take two arguments).

@piever
Copy link
Collaborator

piever commented Oct 7, 2018

I like the idea, but shouldn't this be done by providing a function that has separate methods for when the first or second argument is ::Misssing? Of course, after transitioning to missing for missing data.

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