Skip to content

Commit ee4b751

Browse files
author
luke
committed
Fix return type annotation
1 parent a9443b7 commit ee4b751

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/core/groupby/generic.py

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

10811081
@doc(Series.idxmin.__doc__)
1082-
def idxmin(self, axis: Axis = 0, skipna: bool = True) -> Series:
1082+
def idxmin(self, axis: Axis = 0, skipna: bool = True) -> Series | DataFrame:
10831083
def func(df):
10841084
return df.idxmin(axis=axis, skipna=skipna)
10851085

10861086
func.__name__ = "idxmin"
10871087
return self._idxmin_idxmax(func)
10881088

10891089
@doc(Series.idxmax.__doc__)
1090-
def idxmax(self, axis: Axis = 0, skipna: bool = True) -> Series:
1090+
def idxmax(self, axis: Axis = 0, skipna: bool = True) -> Series | DataFrame:
10911091
def func(df):
10921092
return df.idxmax(axis=axis, skipna=skipna)
10931093

0 commit comments

Comments
 (0)