-
Notifications
You must be signed in to change notification settings - Fork 99
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
SyntaxError: Python keyword not valid identifier in numexpr query #21
Comments
is it because you put |
I see, I think that might be the issue. |
the variable names are parsed to build the rules, which causes your bug. |
Feature names are strings, so it seems like a limitation to restrict what they can contain (everything else in the scikit-learn world doesn't care about it). Maybe it should be allowed, or at least documented somewhere? |
you are right this should be documented. Feel free to open a PR for that or for fixing the syntax error :) |
Guys, I too get the similar error, when I run the below command, if I remove the pipe, it works with only one condition SyntaxError: Python keyword not valid identifier in numexpr query Error is --- train_outliers = train.query('age_z > 3 | age_z < ‐3') |
This happened to me as well. The problem was that I kept holding down the alt-key when writing the following the pipe symbol. I encounter this frequently, as writing pipe requires me to hold alt. |
Happened to me too, do anyone know how to fix?! Thanks xD |
@osdiego Did you copy and paste from another document. The "-3" is not being read correctly by the query function. Try removing/deleting the minus and replacing it. Let me know if this works. |
@CCNOAI I'm doing something like: (importance >= 0 | importance = -7). |
When I add feature names to the SkopeRules model, I encounter this error.
Some of the feature names are :
The text was updated successfully, but these errors were encountered: