Skip to content

Commit 036b2a5

Browse files
committed
Add explict strict=True to zip() calls
1 parent db31f6a commit 036b2a5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pandas/core/strings/accessor.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ def _wrap_result(
334334
)
335335
result = {
336336
label: ArrowExtensionArray(pa.array(res))
337-
for label, res in zip(name, result.T)
337+
for label, res in zip(name, result.T, strict=True)
338338
}
339339
elif is_object_dtype(result):
340340

@@ -684,7 +684,8 @@ def cat(
684684
elif na_rep is not None and union_mask.any():
685685
# fill NaNs with na_rep in case there are actually any NaNs
686686
all_cols = [
687-
np.where(nm, na_rep, col) for nm, col in zip(na_masks, all_cols)
687+
np.where(nm, na_rep, col)
688+
for nm, col in zip(na_masks, all_cols, strict=True)
688689
]
689690
result = cat_safe(all_cols, sep)
690691
else:

0 commit comments

Comments
 (0)