Skip to content

Commit 8ba87ac

Browse files
committed
fixed NamedAgg initialization
1 parent 14d4973 commit 8ba87ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/groupby/generic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def __new__(cls, _column, _aggfunc, *_args, **_kwargs):
145145
if not isinstance(_aggfunc, str):
146146
_aggfunc = cls._get_wrapped_aggfunc(_aggfunc, *_args, **_kwargs)
147147

148-
self = _BaseNamedAgg.__new__(_column, _aggfunc)
148+
self = _BaseNamedAgg.__new__(cls, _column, _aggfunc)
149149
self.original_aggfunc = original_aggfunc
150150
return self
151151

0 commit comments

Comments
 (0)