diff --git a/pandas/core/computation/eval.py b/pandas/core/computation/eval.py index 6dc110e3f8d07..2e5a563b815b3 100644 --- a/pandas/core/computation/eval.py +++ b/pandas/core/computation/eval.py @@ -306,6 +306,9 @@ def eval( "multi-line expressions are only valid in the " "context of data, use DataFrame.eval" ) + engine = _check_engine(engine) + _check_parser(parser) + _check_resolvers(resolvers) ret = None first_expr = True @@ -313,9 +316,6 @@ def eval( for expr in exprs: expr = _convert_expression(expr) - engine = _check_engine(engine) - _check_parser(parser) - _check_resolvers(resolvers) _check_for_locals(expr, level, parser) # get our (possibly passed-in) scope diff --git a/pandas/tests/arrays/test_datetimelike.py b/pandas/tests/arrays/test_datetimelike.py index 5cab0c1fe6d59..84b6d45b78fe8 100644 --- a/pandas/tests/arrays/test_datetimelike.py +++ b/pandas/tests/arrays/test_datetimelike.py @@ -40,8 +40,8 @@ def datetime_index(request): """ freqstr = request.param # TODO: non-monotone indexes; NaTs, different start dates, timezones - pi = pd.date_range(start=pd.Timestamp("2000-01-01"), periods=100, freq=freqstr) - return pi + dti = pd.date_range(start=pd.Timestamp("2000-01-01"), periods=100, freq=freqstr) + return dti @pytest.fixture diff --git a/pandas/tests/test_strings.py b/pandas/tests/test_strings.py index d08c8b1cc13e5..584550d562b0d 100644 --- a/pandas/tests/test_strings.py +++ b/pandas/tests/test_strings.py @@ -2974,14 +2974,10 @@ def test_partition_sep_kwarg(self): # GH 22676; depr kwarg "pat" in favor of "sep" values = Series(["a_b_c", "c_d_e", np.nan, "f_g_h"]) - # str.partition - # using sep -> no warning expected = values.str.partition(sep="_") result = values.str.partition("_") tm.assert_frame_equal(result, expected) - # str.rpartition - # using sep -> no warning expected = values.str.rpartition(sep="_") result = values.str.rpartition("_") tm.assert_frame_equal(result, expected)