We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
x = DataFrame(a=1:2,b=2:3)
might be nice to support
x[:,Not(:a,:c)]
instead of having to write
x[:,Not( [:a,:c] ∩ propertynames(x) )]
The text was updated successfully, but these errors were encountered:
Unfortunately, this is not how Not was designed to work in general (outside of DataFrames.jl):
Not
julia> x = [1, 2, 3] 3-element Vector{Int64}: 1 2 3 julia> x[Not(4)] ERROR: BoundsError: attempt to access 3-element Vector{Int64} at index [Not(4)]
so we have to stick to the same rules.
However, a way to do what you want uses Cols and ∉:
Cols
∉
julia> x[:, Cols(∉(["a", "c"]))] 2×1 DataFrame Row │ b │ Int64 ─────┼─────── 1 │ 2 2 │ 3
or equivalent:
julia> x[:, Cols(!in(["a", "c"]))] 2×1 DataFrame Row │ b │ Int64 ─────┼─────── 1 │ 2 2 │ 3
Sorry, something went wrong.
No branches or pull requests
might be nice to support
instead of having to write
The text was updated successfully, but these errors were encountered: