Skip to content

Commit 08ce8df

Browse files
authored
BUG: fix suppressed TypeErrors in Groupby.mean, median, var (#41292)
1 parent d37b34c commit 08ce8df

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pandas/core/groupby/groupby.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1563,7 +1563,7 @@ def mean(self, numeric_only: bool = True):
15631563
"""
15641564
result = self._cython_agg_general(
15651565
"mean",
1566-
alt=lambda x, axis: Series(x).mean(numeric_only=numeric_only),
1566+
alt=lambda x: Series(x).mean(numeric_only=numeric_only),
15671567
numeric_only=numeric_only,
15681568
)
15691569
return result.__finalize__(self.obj, method="groupby")
@@ -1590,7 +1590,7 @@ def median(self, numeric_only=True):
15901590
"""
15911591
result = self._cython_agg_general(
15921592
"median",
1593-
alt=lambda x, axis: Series(x).median(axis=axis, numeric_only=numeric_only),
1593+
alt=lambda x: Series(x).median(numeric_only=numeric_only),
15941594
numeric_only=numeric_only,
15951595
)
15961596
return result.__finalize__(self.obj, method="groupby")
@@ -1646,7 +1646,7 @@ def var(self, ddof: int = 1):
16461646
"""
16471647
if ddof == 1:
16481648
return self._cython_agg_general(
1649-
"var", alt=lambda x, axis: Series(x).var(ddof=ddof)
1649+
"var", alt=lambda x: Series(x).var(ddof=ddof)
16501650
)
16511651
else:
16521652
func = lambda x: x.var(ddof=ddof)

0 commit comments

Comments
 (0)