Skip to content

Commit b73b192

Browse files
committed
update
1 parent 7ddf7ad commit b73b192

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

pandas/core/arrays/arrow/array.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,15 @@ def _evaluate_op_method(self, other, op, arrow_funcs):
649649
if pc_func is NotImplemented:
650650
raise NotImplementedError(f"{op.__name__} not implemented.")
651651

652-
result = pc_func(self._pa_array, other)
652+
try:
653+
result = pc_func(self._pa_array, other)
654+
except pa.lib.ArrowNotImplementedError:
655+
if op in [operator.add, roperator.radd, operator.sub, roperator.rsub]:
656+
# By returning NotImplemented we get standard message with a
657+
# TypeError
658+
return NotImplemented
659+
raise
660+
653661
return type(self)(result)
654662

655663
def _logical_method(self, other, op):

0 commit comments

Comments
 (0)