DataFramesMeta.jl
DataFramesMeta.jl copied to clipboard
Special case request for Not()
When using DataFrames
with the select function, we can specify select(df, Not(:Col))
.
I would like to see something similar here
@chain df begin
@select @not :Col1 :Col2...
end
Where we want to specify that we don't want certain columns.
I agree that a special case for Not()
is necessary. This request is similar to #283, which proposes—among other changes—the use of @select df Not(:a)
as opposed to the current solution of @select df $(Not(:a))
. With this in mind, two potential designs for this implementation are
@chain df begin
@select @not :Col1 :Col2 ...
end
and
@chain df begin
@select Not([:Col1, :Col2, ...])
end
I prefer @not
as I believe it looks cleaner, buy am curious as to whether there are additional considerations regarding this proposal.
I think Not
is best here. @not
might make some of the parsing kind of confusing. Plus we already allow AsTable
to be special-cased.
I've marked this as 1.0, since I think its an important issue.
Added in #372