Skip to content

Commit 843671c

Browse files
fixup
1 parent cda40ee commit 843671c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pandas/core/arrays/string_.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -825,6 +825,9 @@ def _cmp_method(self, other, op):
825825
f"Lengths of operands do not match: {len(self)} != {len(other)}"
826826
)
827827

828+
# for array-likes, first filter out NAs before converting to numpy
829+
if not is_array_like(other):
830+
other = np.asarray(other)
828831
other = other[valid]
829832
other = np.asarray(other)
830833

0 commit comments

Comments
 (0)