@@ -601,7 +601,7 @@ def _transform(
601601
602602 return result
603603
604- def agg_series (self , obj : Series , func : F , * args , ** kwargs ):
604+ def agg_series (self , obj : Series , func : F ):
605605 # Caller is responsible for checking ngroups != 0
606606 assert self .ngroups != 0
607607
@@ -649,7 +649,7 @@ def _aggregate_series_fast(self, obj: Series, func: F):
649649 result , counts = grouper .get_result ()
650650 return result , counts
651651
652- def _aggregate_series_pure_python (self , obj : Series , func : F , * args , ** kwargs ):
652+ def _aggregate_series_pure_python (self , obj : Series , func : F ):
653653 group_index , _ , ngroups = self .group_info
654654
655655 counts = np .zeros (ngroups , dtype = int )
@@ -658,7 +658,7 @@ def _aggregate_series_pure_python(self, obj: Series, func: F, *args, **kwargs):
658658 splitter = get_splitter (obj , group_index , ngroups , axis = 0 )
659659
660660 for label , group in splitter :
661- res = func (group , * args , ** kwargs )
661+ res = func (group )
662662
663663 if result is None :
664664 if isinstance (res , (Series , Index , np .ndarray )):
@@ -835,7 +835,7 @@ def groupings(self) -> "List[grouper.Grouping]":
835835 for lvl , name in zip (self .levels , self .names )
836836 ]
837837
838- def agg_series (self , obj : Series , func : F , * args , ** kwargs ):
838+ def agg_series (self , obj : Series , func : F ):
839839 # Caller is responsible for checking ngroups != 0
840840 assert self .ngroups != 0
841841 assert len (self .bins ) > 0 # otherwise we'd get IndexError in get_result
0 commit comments