"not equal" querying #179
Answered
by
risenW
spleshakov
asked this question in
Q&A
|
Hello, I went through the documentation and couldn't find a way to filter/query dataframe by "not equal" operator, nor I can think of any workarounds My task is to filter out rows which SERVICE_AREA_ID value starts with There can be more of these service area than 2, but for now I'm even ready to hardcode these two o query for values other than P.S. I need to exclude |
Answered by
risenW
Sep 26, 2021
Replies: 2 comments 4 replies
|
One way I can think of actually, is
|
4 replies
|
This is now supported in the latest version v0.3.0 you can call iloc, loc and query with conditions. For example, this works in query: df.query({ condition: df[“A”].ge(5) })
// Chaining multiple conditions work too:
df.query({ condition: df[“A”].ge(5).and(df[“B”].eq(50) })An array of boolean mask/values of the same length as the DataFrame can be used as well. cc @spleshakov |
0 replies
Answer selected by
risenW
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is now supported in the latest version v0.3.0
you can call iloc, loc and query with conditions. For example, this works in query:
An array of boolean mask/values of the same length as the DataFrame can be used as well.
cc @spleshakov