@@ -1079,13 +1079,13 @@ def nsmallest(
1079
1079
return result
1080
1080
1081
1081
@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 )
1084
1084
return result .astype (self ._obj_with_exclusions .index .dtype )
1085
1085
1086
1086
@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 )
1089
1089
return result .astype (self ._obj_with_exclusions .index .dtype )
1090
1090
1091
1091
@doc (Series .corr .__doc__ )
@@ -2016,6 +2016,7 @@ def idxmax(
2016
2016
def func (df ):
2017
2017
return df .idxmax (axis = axis , skipna = skipna , numeric_only = numeric_only )
2018
2018
2019
+ func .__name__ = "idxmax"
2019
2020
result = self ._python_apply_general (
2020
2021
func , self ._obj_with_exclusions , not_indexed_same = True
2021
2022
)
@@ -2101,6 +2102,7 @@ def idxmin(
2101
2102
def func (df ):
2102
2103
return df .idxmin (axis = axis , skipna = skipna , numeric_only = numeric_only )
2103
2104
2105
+ func .__name__ = "idxmax"
2104
2106
result = self ._python_apply_general (
2105
2107
func , self ._obj_with_exclusions , not_indexed_same = True
2106
2108
)
0 commit comments