Skip to content

Commit 71d2c97

Browse files
authored
Fix zip argument to include all levels in reshape
1 parent eac37c4 commit 71d2c97

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/reshape/reshape.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ def _stack_multi_column_index(columns: MultiIndex) -> MultiIndex | Index:
792792
[
793793
# Not all indices can accept None values.
794794
Index(new_lev, dtype=lev.dtype) if None not in new_lev else new_lev
795-
for new_lev, lev in zip(new_levs, columns.levels[:-1], strict=True)
795+
for new_lev, lev in zip(new_levs, columns.levels)
796796
],
797797
names=columns.names[:-1],
798798
)

0 commit comments

Comments
 (0)