Skip to content

Commit 2894694

Browse files
committed
removed incorrect modifications
1 parent 103ce47 commit 2894694

File tree

1 file changed

+6
-34
lines changed

1 file changed

+6
-34
lines changed

pandas/core/groupby/groupby.py

+6-34
Original file line numberDiff line numberDiff line change
@@ -4569,23 +4569,11 @@ def rank(
45694569
@Substitution(name="groupby")
45704570
@Substitution(see_also=_common_see_also)
45714571
def cumprod(
4572-
self,
4573-
axis: Axis | lib.NoDefault = lib.no_default,
4574-
numeric_only: bool = False,
4575-
skipna: bool = True,
4572+
self, axis: Axis | lib.NoDefault = lib.no_default, *args, **kwargs
45764573
) -> NDFrameT:
45774574
"""
45784575
Cumulative product for each group.
45794576
4580-
Parameters
4581-
----------
4582-
axis : int, default 0
4583-
The axis to apply the cumulative product along.
4584-
numeric_only : bool, default False
4585-
Include only float, int, boolean columns.
4586-
skipna : bool, default True
4587-
Exclude NA/null values when computing the result.
4588-
45894577
Returns
45904578
-------
45914579
Series or DataFrame
@@ -4633,34 +4621,20 @@ def cumprod(
46334621
axis = 0
46344622

46354623
if axis != 0:
4636-
f = lambda x: x.cumprod(axis=axis, numeric_only=numeric_only, skipna=skipna)
4624+
f = lambda x: x.cumprod(axis=axis, **kwargs)
46374625
return self._python_apply_general(f, self._selected_obj, is_transform=True)
46384626

4639-
return self._cython_transform(
4640-
"cumprod", numeric_only=numeric_only, skipna=skipna
4641-
)
4627+
return self._cython_transform("cumprod", **kwargs)
46424628

46434629
@final
46444630
@Substitution(name="groupby")
46454631
@Substitution(see_also=_common_see_also)
46464632
def cumsum(
4647-
self,
4648-
axis: Axis | lib.NoDefault = lib.no_default,
4649-
numeric_only: bool = False,
4650-
skipna: bool = True,
4633+
self, axis: Axis | lib.NoDefault = lib.no_default, *args, **kwargs
46514634
) -> NDFrameT:
46524635
"""
46534636
Cumulative sum for each group.
46544637
4655-
Parameters
4656-
----------
4657-
axis : int, default 0
4658-
The axis to apply the cumulative sum along.
4659-
numeric_only : bool, default False
4660-
Include only float, int, boolean columns.
4661-
skipna : bool, default True
4662-
Exclude NA/null values when computing the result.
4663-
46644638
Returns
46654639
-------
46664640
Series or DataFrame
@@ -4708,12 +4682,10 @@ def cumsum(
47084682
axis = 0
47094683

47104684
if axis != 0:
4711-
f = lambda x: x.cumsum(axis=axis, numeric_only=numeric_only, skipna=skipna)
4685+
f = lambda x: x.cumsum(axis=axis, **kwargs)
47124686
return self._python_apply_general(f, self._selected_obj, is_transform=True)
47134687

4714-
return self._cython_transform(
4715-
"cumsum", numeric_only=numeric_only, skipna=skipna
4716-
)
4688+
return self._cython_transform("cumsum", **kwargs)
47174689

47184690
@final
47194691
@Substitution(name="groupby")

0 commit comments

Comments
 (0)