Open saurabhdaalia opened 5 years ago
is it because you put =
in your feature names?
I see, I think that might be the issue. But what is causing this issue? Is there any workaround for it?
the variable names are parsed to build the rules, which causes your bug.
I don't see an easy workaround. You really shouldn't put =
in your feature names...
You really shouldn't put = in your feature names...
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')
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
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). The question is: I need to search like that, is there no way?
When I add feature names to the SkopeRules model, I encounter this error.
Some of the feature names are :