8000 BUG: Fix bug when using df.query with "str.contains()" by dtpc · Pull Request #25813 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

BUG: Fix bug when using df.query with "str.contains()" #25813

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

Closed
wants to merge 6 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
BUG: Fix bug when using eval to call "str" methods
  • Loading branch information
dtpc committed Mar 21, 2019
commit 64004bc139acf82009d68a508cf0961397b868cb
5 changes: 1 addition & 4 deletions pandas/core/computation/expr.py
Original file line number Diff line number Diff line change
Expand Up @@ -632,11 +632,8 @@ def visit_Call_35(self, node, side=None, **kwargs):
if not isinstance(key, ast.keyword):
raise ValueError("keyword error in function call "
"'{func}'".format(func=node.func.id))

if key.arg:
# TODO: bug?
kwargs.append(ast.keyword(
keyword.arg, self.visit(keyword.value))) # noqa
kwargs[key.arg] = self.visit(key.value)()

return self.const_type(res(*new_args, **kwargs), self.env)

Expand Down
0