Skip to content

Commit d2478f5

Browse files
authored
ArrowStringArray._cmp_method TODO (#46417)
1 parent f469af7 commit d2478f5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pandas/core/arrays/string_arrow.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,11 @@ def _cmp_method(self, other, op):
332332
else:
333333
return NotImplemented
334334

335-
# TODO(ARROW-9429): Add a .to_numpy() to ChunkedArray
336-
return BooleanArray._from_sequence(result.to_pandas().values)
335+
if pa_version_under2p0:
336+
result = result.to_pandas().values
337+
else:
338+
result = result.to_numpy()
339+
return BooleanArray._from_sequence(result)
337340

338341
def insert(self, loc: int, item):
339342
if not isinstance(item, str) and item is not libmissing.NA:

0 commit comments

Comments
 (0)