Skip to content

Commit 71a2201

Browse files
committed
Avoids comprehension iterators
1 parent 199bf20 commit 71a2201

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

pandas/core/internals/managers.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -419,11 +419,10 @@ def apply(
419419
result_blocks: list[Block] = []
420420
# fillna: Series/DataFrame is responsible for making sure value is aligned
421421

422-
aligned_args = {k: kwargs[k] for k in align_keys}
423-
424422
for b in self.blocks:
425-
if aligned_args:
426-
for k, obj in aligned_args.items():
423+
if align_keys:
424+
for k in align_keys:
425+
obj = kwargs[k]
427426
if isinstance(obj, (ABCSeries, ABCDataFrame)):
428427
# The caller is responsible for ensuring that
429428
# obj.axes[-1].equals(self.items)

0 commit comments

Comments
 (0)