diff --git a/pandas/core/ops/__init__.py b/pandas/core/ops/__init__.py index f3c1a609d50a1..410bb3ac9f162 100644 --- a/pandas/core/ops/__init__.py +++ b/pandas/core/ops/__init__.py @@ -374,7 +374,6 @@ def dispatch_to_series(left, right, func, str_rep=None, axis=None): """ # Note: we use iloc to access columns for compat with cases # with non-unique columns. - import pandas.core.computation.expressions as expressions right = lib.item_from_zerodim(right) if lib.is_scalar(right) or np.ndim(right) == 0: @@ -419,7 +418,7 @@ def column_op(a, b): # Remaining cases have less-obvious dispatch rules raise NotImplementedError(right) - new_data = expressions.evaluate(column_op, str_rep, left, right) + new_data = column_op(left, right) return new_data diff --git a/pandas/tests/test_expressions.py b/pandas/tests/test_expressions.py index fadab5d821470..d6560c6341021 100644 --- a/pandas/tests/test_expressions.py +++ b/pandas/tests/test_expressions.py @@ -95,7 +95,10 @@ def run_binary(self, df, other): expr.get_test_result() result = op(df, other) used_numexpr = expr.get_test_result() - assert used_numexpr, "Did not use numexpr as expected." + + # We don't currently use numexpr for comparisons in Series, + # so dont for DataFrame either. + assert not used_numexpr, "unexpectedly numexpr as expected." tm.assert_equal(expected, result) def run_frame(self, df, other, run_binary=True):