We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9443b7 commit ee4b751Copy full SHA for ee4b751
pandas/core/groupby/generic.py
@@ -1079,15 +1079,15 @@ def nsmallest(
1079
return result
1080
1081
@doc(Series.idxmin.__doc__)
1082
- def idxmin(self, axis: Axis = 0, skipna: bool = True) -> Series:
+ def idxmin(self, axis: Axis = 0, skipna: bool = True) -> Series | DataFrame:
1083
def func(df):
1084
return df.idxmin(axis=axis, skipna=skipna)
1085
1086
func.__name__ = "idxmin"
1087
return self._idxmin_idxmax(func)
1088
1089
@doc(Series.idxmax.__doc__)
1090
- def idxmax(self, axis: Axis = 0, skipna: bool = True) -> Series:
+ def idxmax(self, axis: Axis = 0, skipna: bool = True) -> Series | DataFrame:
1091
1092
return df.idxmax(axis=axis, skipna=skipna)
1093
0 commit comments