You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So this is actually an issue with numexpr release 2.8.5 which went live on Sunday 6th August 2023:
As an addendum to the use of NumExpr for parsing user inputs, is that NumExpr
calls eval on the inputs. A regular expression is now applied to help sanitize
the input expression string, forbidding '__', ':', and ';'. Attribute access
Not sure if this qualifies as a bug over there, but it breaks pandas if you have numexpr==2.8.5 installed
Expected Behavior
df.query("A == 8", engine="numexpr")
correctly queries the df and produces a valid response. So this is an issue with using @ variables in the query which produces those dunder variables, although I guess it may manifest elsewhere.
Hi, thanks for your report. Did you report this in numexpr as well?
No, but I can do if you think it necessary. Because it’s listed as a new feature, I figured that it shouldn’t be reported as a bug. But it’s also not noted as a breaking change either!
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
So this is actually an issue with
numexpr
release 2.8.5 which went live on Sunday 6th August 2023:calls
eval
on the inputs. A regular expression is now applied to help sanitizethe input expression string, forbidding '__', ':', and ';'. Attribute access
Not sure if this qualifies as a bug over there, but it breaks pandas if you have
numexpr==2.8.5
installedExpected Behavior
correctly queries the df and produces a valid response. So this is an issue with using @ variables in the query which produces those dunder variables, although I guess it may manifest elsewhere.
Installed Versions
The text was updated successfully, but these errors were encountered: