Skip to content

Commit 51c58fe

Browse files
committed
updated according to reviewer suggestions
1 parent 6b97994 commit 51c58fe

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

pandas/core/groupby/groupby.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3807,21 +3807,19 @@ def expanding(self, *args, **kwargs) -> ExpandingGroupby:
38073807
"""
38083808
Return an expanding grouper, providing expanding functionality per group.
38093809
3810+
Arguments are the same as `:meth:DataFrame.rolling` except that ``step`` cannot
3811+
be specified.
3812+
38103813
Parameters
38113814
----------
38123815
*args : tuple
38133816
Positional arguments passed to the expanding window constructor.
38143817
**kwargs : dict
38153818
Keyword arguments passed to the expanding window constructor,
3816-
such as:
3817-
3818-
min_periods : int, default 1
3819-
Minimum number of observations in the window required to have a value;
3820-
otherwise, the result is ``np.nan``.
38213819
38223820
Returns
38233821
-------
3824-
pandas.core.window.ExpandingGroupby
3822+
pandas.api.typing.ExpandingGroupby
38253823
An object that supports expanding transformations over each group.
38263824
38273825
See Also
@@ -3848,7 +3846,7 @@ def expanding(self, *args, **kwargs) -> ExpandingGroupby:
38483846
4 B 50
38493847
5 B 60
38503848
3851-
>>> df.groupby("Class").expanding().mean().reset_index(drop=True)
3849+
>>> df.groupby("Class").expanding().mean()
38523850
Value
38533851
0 10.0
38543852
1 15.0

0 commit comments

Comments
 (0)