Skip to content

Commit 3aca523

Browse files
author
jmishra
committed
Fix issue of apply function of DataFrame
1 parent a6c02f0 commit 3aca523

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas/core/apply.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,8 @@ def series_generator(self):
530530
ser._mgr = mgr
531531
blk.values = arr
532532
ser.name = name
533-
yield ser
533+
# To fix issue of #39166
534+
yield ser.copy()
534535

535536
@property
536537
def result_index(self) -> Index:

0 commit comments

Comments
 (0)