Skip to content

Commit 84a46eb

Browse files
committed
pass object with exclusions earlier on
1 parent decf1f2 commit 84a46eb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pandas/core/groupby/groupby.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1577,6 +1577,7 @@ def rolling(self, *args, **kwargs):
15771577
"""
15781578
from pandas.core.window import RollingGroupby
15791579

1580+
self.obj = self._obj_with_exclusions
15801581
return RollingGroupby(self, *args, **kwargs)
15811582

15821583
@Substitution(name="groupby")

pandas/core/window/common.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ def __init__(self, obj, *args, **kwargs):
5252
kwargs.pop("parent", None)
5353
groupby = kwargs.pop("groupby", None)
5454
if groupby is None:
55-
groupby, obj = obj, obj._obj_with_exclusions
56-
groupby.obj = obj
55+
groupby, obj = obj, obj.obj
5756
self._groupby = groupby
5857
self._groupby.mutated = True
5958
self._groupby.grouper.mutated = True

0 commit comments

Comments
 (0)