Skip to content

Commit ae26c2e

Browse files
author
luke
committed
Fix typo
1 parent 498917e commit ae26c2e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

pandas/core/groupby/generic.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,13 +1079,13 @@ def nsmallest(
10791079
return result
10801080

10811081
@doc(Series.idxmin.__doc__)
1082-
def idxmin(self, axis: Axis = 0, skipna: bool = True) -> Series | DataFrame:
1083-
result = self._op_via_apply("idxmax", axis=axis, skipna=skipna)
1082+
def idxmin(self, axis: Axis = 0, skipna: bool = True) -> Series:
1083+
result = self._op_via_apply("idxmin", axis=axis, skipna=skipna)
10841084
return result.astype(self._obj_with_exclusions.index.dtype)
10851085

10861086
@doc(Series.idxmax.__doc__)
1087-
def idxmax(self, axis: Axis = 0, skipna: bool = True) -> Series | DataFrame:
1088-
result = self._op_via_apply("idxmin", axis=axis, skipna=skipna)
1087+
def idxmax(self, axis: Axis = 0, skipna: bool = True) -> Series:
1088+
result = self._op_via_apply("idxmax", axis=axis, skipna=skipna)
10891089
return result.astype(self._obj_with_exclusions.index.dtype)
10901090

10911091
@doc(Series.corr.__doc__)
@@ -2016,6 +2016,7 @@ def idxmax(
20162016
def func(df):
20172017
return df.idxmax(axis=axis, skipna=skipna, numeric_only=numeric_only)
20182018

2019+
func.__name__ = "idxmax"
20192020
result = self._python_apply_general(
20202021
func, self._obj_with_exclusions, not_indexed_same=True
20212022
)
@@ -2101,6 +2102,7 @@ def idxmin(
21012102
def func(df):
21022103
return df.idxmin(axis=axis, skipna=skipna, numeric_only=numeric_only)
21032104

2105+
func.__name__ = "idxmax"
21042106
result = self._python_apply_general(
21052107
func, self._obj_with_exclusions, not_indexed_same=True
21062108
)

0 commit comments

Comments
 (0)