We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1642cdb commit db57aabCopy full SHA for db57aab
pandas/tests/computation/test_eval.py
@@ -737,12 +737,15 @@ def test_and_logic_string_match(self):
737
assert pd.eval(f"{event.str.match('hello').a}")
738
assert pd.eval(f"{event.str.match('hello').a and event.str.match('hello').a}")
739
740
- def test_using_numpy(self):
+ @pytest.mark.parametrize("engine", ["python", "numexpr"])
741
+ def test_using_numpy(self, engine):
742
# GH 58041
743
df = Series([0.2, 1.5, 2.8], name="a").to_frame()
- res = df.eval("@np.floor(a)")
744
+ res = df.eval("@np.floor(a)", engine=engine)
745
expected = np.floor(df["a"])
- tm.assert_series_equal(expected, res, check_names=False)
746
+ if engine == "numexpr":
747
+ expected.name = None # See GH 58069
748
+ tm.assert_series_equal(expected, res)
749
750
751
# -------------------------------------
0 commit comments