Skip to content

Commit

Permalink
Update pandas/tests/computation/test_eval.py
Browse files Browse the repository at this point in the history
  • Loading branch information
domsmrz committed Apr 29, 2024
1 parent ebd3146 commit 8445a14
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pandas/tests/computation/test_eval.py
Expand Up @@ -738,9 +738,9 @@ def test_and_logic_string_match(self):
assert pd.eval(f"{event.str.match('hello').a and event.str.match('hello').a}")

def test_eval_keep_name(self, engine, parser):
df = Series([0.2, 1.5, 2.8], name="a").to_frame()
res = df.eval("a * a", engine=engine, parser=parser)
expected = df["a"] * df["a"]
df = Series([2, 15, 28], name="a").to_frame()
res = df.eval("a + a", engine=engine, parser=parser)
expected = pd.Series([4, 30, 56], name="a")
tm.assert_series_equal(expected, res)

def test_eval_unmatching_names(self, engine, parser):
Expand Down

0 comments on commit 8445a14

Please sign in to comment.