File tree Expand file tree Collapse file tree 2 files changed +7
-13
lines changed Expand file tree Collapse file tree 2 files changed +7
-13
lines changed Original file line number Diff line number Diff line change @@ -11010,7 +11010,8 @@ def idxmin(
1101011010
1101111011 index = data ._get_axis (axis )
1101211012 result = [index [i ] if i >= 0 else np .nan for i in indices ]
11013- return data ._constructor_sliced (result , index = data ._get_agg_axis (axis ))
11013+ final_result = data ._constructor_sliced (result , index = data ._get_agg_axis (axis ))
11014+ return final_result .__finalize__ (self , method = "idxmin" )
1101411015
1101511016 @doc (_shared_docs ["idxmax" ], numeric_only_default = "False" )
1101611017 def idxmax (
@@ -11035,7 +11036,8 @@ def idxmax(
1103511036
1103611037 index = data ._get_axis (axis )
1103711038 result = [index [i ] if i >= 0 else np .nan for i in indices ]
11038- return data ._constructor_sliced (result , index = data ._get_agg_axis (axis ))
11039+ final_result = data ._constructor_sliced (result , index = data ._get_agg_axis (axis ))
11040+ return final_result .__finalize__ (self , method = "idxmax" )
1103911041
1104011042 def _get_agg_axis (self , axis_num : int ) -> Index :
1104111043 """
Original file line number Diff line number Diff line change 226226 pytest .param (
227227 (pd .DataFrame , frame_data , operator .methodcaller ("nunique" )),
228228 ),
229- pytest .param (
230- (pd .DataFrame , frame_data , operator .methodcaller ("idxmin" )),
231- marks = not_implemented_mark ,
232- ),
233- pytest .param (
234- (pd .DataFrame , frame_data , operator .methodcaller ("idxmax" )),
235- marks = not_implemented_mark ,
236- ),
237- pytest .param (
238- (pd .DataFrame , frame_data , operator .methodcaller ("mode" )),
239- ),
229+ (pd .DataFrame , frame_data , operator .methodcaller ("idxmin" )),
230+ (pd .DataFrame , frame_data , operator .methodcaller ("idxmax" )),
231+ (pd .DataFrame , frame_data , operator .methodcaller ("mode" )),
240232 pytest .param (
241233 (pd .Series , [0 ], operator .methodcaller ("mode" )),
242234 marks = not_implemented_mark ,
You can’t perform that action at this time.
0 commit comments