Skip to content

Commit 02ead68

Browse files
author
Rohan Jain
committed
fix validation
1 parent 2b3c1ec commit 02ead68

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pandas/core/arrays/arrow/array.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -705,8 +705,10 @@ def _evaluate_op_method(self, other, op, arrow_funcs):
705705
elif op in [operator.mul, roperator.rmul]:
706706
result = type(self)._evaluate_binary_repeat(self._pa_array, other)
707707
return type(self)(result)
708-
elif pa.types.is_integer(pa_type) and (
709-
pa.types.is_string(other.type) or pa.types.is_binary(other.type)
708+
elif (
709+
pa.types.is_integer(pa_type)
710+
and (pa.types.is_string(other.type) or pa.types.is_binary(other.type))
711+
and op in [operator.mul, roperator.rmul]
710712
):
711713
result = type(self)._evaluate_binary_repeat(other, self._pa_array)
712714
return type(self)(result)

0 commit comments

Comments
 (0)