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

Not does not work in @linq or @select #150

Closed
lassepe opened this issue May 21, 2020 · 3 comments · Fixed by #151
Closed

Not does not work in @linq or @select #150

lassepe opened this issue May 21, 2020 · 3 comments · Fixed by #151
Milestone

Comments

@lassepe
Copy link

lassepe commented May 21, 2020

Currently, it seems like one can not use the Not selector in @linq or @select queries.

For example,

df = DataFrame(x=rand(3), y=rand(3))
@linq df |> select(Not(:x)) # <-- does not work
@select(df, Not(:x)) # <-- does not work

does not work as :x is replaced with the values of the :x column.

Instead one needs to escape :x in the Not call.

@linq df |> select(Not(^(:x)))
# or...
@select(df, Not(^(:x)))

Is this the desired behavior? If so, it may need to be documented (is it?). Are there any cases in which replacing a symbol with the column data is needed in a call to select?

@pdeffebach
Copy link
Collaborator

Thanks for the bug report. This is indeed not desired behavior.

It will be fixed in upcoming versions of DataFramesMeta. In the meantime I have created #151 to make users informed of this.

@nalimilan nalimilan reopened this Sep 11, 2020
@pdeffebach pdeffebach added this to the 1.X milestone Mar 7, 2021
@pdeffebach
Copy link
Collaborator

Marking as 1.X. This is definitely a high priority feature, but it isn't breaking so doesn't need to be added in 1.0.

@pdeffebach
Copy link
Collaborator

Closed for consolidation with #283

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

Successfully merging a pull request may close this issue.

3 participants