@@ -4681,12 +4681,14 @@ def rank(
4681
4681
@final
4682
4682
@Substitution (name = "groupby" )
4683
4683
@Substitution (see_also = _common_see_also )
4684
- def cumprod (self , * args , ** kwargs ) -> NDFrameT :
4684
+ def cumprod (self , numeric_only : bool = False , * args , ** kwargs ) -> NDFrameT :
4685
4685
"""
4686
4686
Cumulative product for each group.
4687
4687
4688
4688
Parameters
4689
4689
----------
4690
+ numeric_only : bool
4691
+ Optional argument with default as False.
4690
4692
*args : tuple
4691
4693
Positional arguments to be passed to `func`.
4692
4694
**kwargs : dict
@@ -4734,18 +4736,20 @@ def cumprod(self, *args, **kwargs) -> NDFrameT:
4734
4736
horse 16 10
4735
4737
bull 6 9
4736
4738
"""
4737
- nv .validate_groupby_func ("cumprod" , args , kwargs , ["numeric_only" , " skipna" ])
4738
- return self ._cython_transform ("cumprod" , ** kwargs )
4739
+ nv .validate_groupby_func ("cumprod" , args , kwargs , ["skipna" ])
4740
+ return self ._cython_transform ("cumprod" , numeric_only , ** kwargs )
4739
4741
4740
4742
@final
4741
4743
@Substitution (name = "groupby" )
4742
4744
@Substitution (see_also = _common_see_also )
4743
- def cumsum (self , * args , ** kwargs ) -> NDFrameT :
4745
+ def cumsum (self , numeric_only : bool = False , * args , ** kwargs ) -> NDFrameT :
4744
4746
"""
4745
4747
Cumulative sum for each group.
4746
4748
4747
4749
Parameters
4748
4750
----------
4751
+ numeric_only : bool
4752
+ Optional argument with default as False.
4749
4753
*args : tuple
4750
4754
Positional arguments to be passed to `func`.
4751
4755
**kwargs : dict
@@ -4793,8 +4797,8 @@ def cumsum(self, *args, **kwargs) -> NDFrameT:
4793
4797
gorilla 10 7
4794
4798
lion 6 9
4795
4799
"""
4796
- nv .validate_groupby_func ("cumsum" , args , kwargs , ["numeric_only" , " skipna" ])
4797
- return self ._cython_transform ("cumsum" , ** kwargs )
4800
+ nv .validate_groupby_func ("cumsum" , args , kwargs , ["skipna" ])
4801
+ return self ._cython_transform ("cumsum" , numeric_only , ** kwargs )
4798
4802
4799
4803
@final
4800
4804
@Substitution (name = "groupby" )
0 commit comments