| 629 | assert res.values == np.array([False]) |
| 630 | |
| 631 | def test_unary_in_function(self): |
| 632 | # GH 46471 |
| 633 | df = DataFrame({"x": [0, 1, np.nan]}) |
| 634 | |
| 635 | result = df.eval("x.fillna(-1)") |
| 636 | expected = df.x.fillna(-1) |
| 637 | # column name becomes None if using numexpr |
| 638 | # only check names when the engine is not numexpr |
| 639 | tm.assert_series_equal(result, expected, check_names=not USE_NUMEXPR) |
| 640 | |
| 641 | result = df.eval("x.shift(1, fill_value=-1)") |
| 642 | expected = df.x.shift(1, fill_value=-1) |
| 643 | tm.assert_series_equal(result, expected, check_names=not USE_NUMEXPR) |
| 644 | |
| 645 | @pytest.mark.parametrize( |
| 646 | "ex", |