From c6900ac372f9a8511b188d2287ff2113da8e1e2a Mon Sep 17 00:00:00 2001 From: jbrockmendel Date: Mon, 2 Sep 2019 18:38:20 -0700 Subject: [PATCH] re-implement #27959 --- pandas/core/ops/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pandas/core/ops/__init__.py b/pandas/core/ops/__init__.py index cc2d4ced1243f..9fd6efe32de29 100644 --- a/pandas/core/ops/__init__.py +++ b/pandas/core/ops/__init__.py @@ -829,6 +829,13 @@ def wrapper(self, other): # Defer to DataFrame implementation; fail early return NotImplemented + elif should_extension_dispatch(self, other): + lvalues = extract_array(self, extract_numpy=True) + rvalues = extract_array(other, extract_numpy=True) + res_values = dispatch_to_extension_op(op, lvalues, rvalues) + result = self._constructor(res_values, index=self.index, name=res_name) + return finalizer(result) + elif isinstance(other, (ABCSeries, ABCIndexClass)): is_other_int_dtype = is_integer_dtype(other.dtype) other = other if is_other_int_dtype else fill_bool(other)