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

Special case request for Not() #349

Closed
fieldofnodes opened this issue Jan 1, 2023 · 3 comments
Closed

Special case request for Not() #349

fieldofnodes opened this issue Jan 1, 2023 · 3 comments
Labels

Comments

@fieldofnodes
Copy link

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.

@MatthewRGonzalez
Copy link
Contributor

MatthewRGonzalez commented Jan 7, 2023

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.

@pdeffebach
Copy link
Collaborator

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.

@pdeffebach pdeffebach added the 1.0 label Apr 9, 2023
@pdeffebach
Copy link
Collaborator

Added in #372

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants