Skip to content

BUG: Fix bug in pd.eval when UnaryOp in function #48511

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

Merged
merged 6 commits into from
Sep 14, 2022
Merged
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
Fix test
  • Loading branch information
yuanx749 committed Sep 12, 2022
commit 95c86dba0c7267a0587b2cb82b530da4d9c8c93e
4 changes: 2 additions & 2 deletions pandas/tests/computation/test_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -606,11 +606,11 @@ def test_unary_in_function(self):

result = df.eval("x.fillna(-1)")
expected = df.x.fillna(-1)
tm.assert_series_equal(result, expected)
tm.assert_series_equal(result, expected, check_names=False)

result = df.eval("x.shift(1, fill_value=-1)")
expected = df.x.shift(1, fill_value=-1)
tm.assert_series_equal(result, expected)
tm.assert_series_equal(result, expected, check_names=False)

@pytest.mark.parametrize(
"ex",
Expand Down