Skip to content

Commit 2791388

Browse files
authored
STY: Add strict=True to zip() calls in pandas/core/reshape/encoding.py (Ruff B905) (#62982)
1 parent c14d4f1 commit 2791388

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/core/reshape/encoding.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,15 +325,15 @@ def get_empty_frame(data) -> DataFrame:
325325
codes = codes[mask]
326326
n_idx = np.arange(N)[mask]
327327

328-
for ndx, code in zip(n_idx, codes):
328+
for ndx, code in zip(n_idx, codes, strict=True):
329329
sp_indices[code].append(ndx)
330330

331331
if drop_first:
332332
# remove first categorical level to avoid perfect collinearity
333333
# GH12042
334334
sp_indices = sp_indices[1:]
335335
dummy_cols = dummy_cols[1:]
336-
for col, ixs in zip(dummy_cols, sp_indices):
336+
for col, ixs in zip(dummy_cols, sp_indices, strict=True):
337337
sarr = SparseArray(
338338
np.ones(len(ixs), dtype=dtype),
339339
sparse_index=IntIndex(N, ixs),

0 commit comments

Comments
 (0)