@@ -601,7 +601,7 @@ def _transform(
601
601
602
602
return result
603
603
604
- def agg_series (self , obj : Series , func : F , * args , ** kwargs ):
604
+ def agg_series (self , obj : Series , func : F ):
605
605
# Caller is responsible for checking ngroups != 0
606
606
assert self .ngroups != 0
607
607
@@ -649,7 +649,7 @@ def _aggregate_series_fast(self, obj: Series, func: F):
649
649
result , counts = grouper .get_result ()
650
650
return result , counts
651
651
652
- def _aggregate_series_pure_python (self , obj : Series , func : F , * args , ** kwargs ):
652
+ def _aggregate_series_pure_python (self , obj : Series , func : F ):
653
653
group_index , _ , ngroups = self .group_info
654
654
655
655
counts = np .zeros (ngroups , dtype = int )
@@ -658,7 +658,7 @@ def _aggregate_series_pure_python(self, obj: Series, func: F, *args, **kwargs):
658
658
splitter = get_splitter (obj , group_index , ngroups , axis = 0 )
659
659
660
660
for label , group in splitter :
661
- res = func (group , * args , ** kwargs )
661
+ res = func (group )
662
662
663
663
if result is None :
664
664
if isinstance (res , (Series , Index , np .ndarray )):
@@ -835,7 +835,7 @@ def groupings(self) -> "List[grouper.Grouping]":
835
835
for lvl , name in zip (self .levels , self .names )
836
836
]
837
837
838
- def agg_series (self , obj : Series , func : F , * args , ** kwargs ):
838
+ def agg_series (self , obj : Series , func : F ):
839
839
# Caller is responsible for checking ngroups != 0
840
840
assert self .ngroups != 0
841
841
assert len (self .bins ) > 0 # otherwise we'd get IndexError in get_result
0 commit comments