IndexedTables.jl icon indicating copy to clipboard operation
IndexedTables.jl copied to clipboard

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

Open simonbyrne opened this issue 7 years ago • 1 comments

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).

simonbyrne avatar Oct 04 '18 16:10 simonbyrne

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.

piever avatar Oct 07 '18 16:10 piever