diff --git a/pandas/core/apply.py b/pandas/core/apply.py index 0246971bfa2b4..3544f165e1d68 100644 --- a/pandas/core/apply.py +++ b/pandas/core/apply.py @@ -530,7 +530,8 @@ def series_generator(self): ser._mgr = mgr blk.values = arr ser.name = name - yield ser + # To fix issue of #39166 + yield ser.copy() @property def result_index(self) -> Index: