Closed tobi-lipede-oodle closed 3 years ago
you can use keywords with all macros, so @subset(df, :col == X; skipmissing = true)
should work. It currently only works with the parentheses macro syntax because of the way parsing of keyword arguments works. And I've noticed that it doesn't currently work with Chain.jl when leaving out the first parameter, because the keyword arguments technically come before the positional arguments and I hadn't considered that at the time. I still want to add that to Chain.jl, though.
And maybe I'll put in a shortcut for skipmissing = true
because I'm also annoyed by it, but I have to think that through first.
Ahh I see, thanks for the quick response! Yeah I was getting caught out when using the Chain.jl workflow. The following seems to work:
@subset(_, predicates...; kwargs...)
Macro keyword arguments work now in Chain.jl https://github.com/jkrumbiegel/Chain.jl/pull/31
Oh wow awesome thanks!
This is an awesome package :) - I really like the 'rowwise by default' operations.
Currently
@subset
will fail for a simple:col == X
predicate if :col contains missing values. I think that for most users it might be preferable to have skipmissing set to true by default. Or failing that to allow a skipmissing option. There is of course the third option of the user writing something likeismissing(:col) ? false : :col == X
, but that makes things more verbose