-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: allow use of both default+input resolvers in df.eval, GH34966 #45134
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
Conversation
Allow default resolvers to be used with input resolvers in dataframe.eval. Resolves GH34966
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
umm can you add a test which fails w/o this change
Hello @bubblingoak! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2022-01-04 00:39:55 UTC |
Added the test result = df.eval("a + b * c", resolvers=[dict1]) with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small commment, ping on green
thanks @bubblingoak |
Allows default resolvers to be used with input resolvers in
pandas.dataframe.eval
. Previously cases such as this would break:with
pandas.core.computation.ops.UndefinedVariableError: name 'a' is not defined
as explained in #34966. Following this update, the above works as expected.Added a test similar to the above:
tests.frame.test_query_eval.TestDataFrameEval.test_eval_resolvers_combined