Skip to content

Commit 6e786d1

Browse files
author
Anthony Speicher
committed
ENH: Add strict=True/False to zip calls in pandas/core/internals
1 parent 6c0f653 commit 6e786d1

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

pandas/core/internals/blocks.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2117,7 +2117,9 @@ def _unstack(
21172117
BlockPlacement(place),
21182118
ndim=2,
21192119
)
2120-
for i, (indices, place) in enumerate(zip(new_values, new_placement, strict=True))
2120+
for i, (indices, place) in enumerate(
2121+
zip(new_values, new_placement, strict=True)
2122+
)
21212123
]
21222124
return blocks, mask
21232125

pandas/core/internals/managers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,9 @@ def equals(self, other: object) -> bool:
385385
self_axes, other_axes = self.axes, other.axes
386386
if len(self_axes) != len(other_axes):
387387
return False
388-
if not all(ax1.equals(ax2) for ax1, ax2 in zip(self_axes, other_axes, strict=True)):
388+
if not all(
389+
ax1.equals(ax2) for ax1, ax2 in zip(self_axes, other_axes, strict=True)
390+
):
389391
return False
390392

391393
return self._equal_values(other)

0 commit comments

Comments
 (0)