@@ -608,7 +608,7 @@ def _transform(
608
608
609
609
return result
610
610
611
- def agg_series (self , obj : Series , func : F , * args , ** kwargs ):
611
+ def agg_series (self , obj : Series , func : F ):
612
612
# Caller is responsible for checking ngroups != 0
613
613
assert self .ngroups != 0
614
614
@@ -660,7 +660,7 @@ def _aggregate_series_fast(self, obj: Series, func: F):
660
660
result , counts = grouper .get_result ()
661
661
return result , counts
662
662
663
- def _aggregate_series_pure_python (self , obj : Series , func : F , * args , ** kwargs ):
663
+ def _aggregate_series_pure_python (self , obj : Series , func : F ):
664
664
group_index , _ , ngroups = self .group_info
665
665
666
666
counts = np .zeros (ngroups , dtype = int )
@@ -669,7 +669,7 @@ def _aggregate_series_pure_python(self, obj: Series, func: F, *args, **kwargs):
669
669
splitter = get_splitter (obj , group_index , ngroups , axis = 0 )
670
670
671
671
for label , group in splitter :
672
- res = func (group , * args , ** kwargs )
672
+ res = func (group )
673
673
674
674
if result is None :
675
675
if isinstance (res , (Series , Index , np .ndarray )):
@@ -846,7 +846,7 @@ def groupings(self) -> "List[grouper.Grouping]":
846
846
for lvl , name in zip (self .levels , self .names )
847
847
]
848
848
849
- def agg_series (self , obj : Series , func : F , * args , ** kwargs ):
849
+ def agg_series (self , obj : Series , func : F ):
850
850
# Caller is responsible for checking ngroups != 0
851
851
assert self .ngroups != 0
852
852
assert len (self .bins ) > 0 # otherwise we'd get IndexError in get_result
0 commit comments