diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 6c3523f830e97..04ebaf26fc11c 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -8548,7 +8548,7 @@ def idxmax(self, axis=0, skipna=True) -> Series: result = [index[i] if i >= 0 else np.nan for i in indices] return Series(result, index=self._get_agg_axis(axis)) - def _get_agg_axis(self, axis_num): + def _get_agg_axis(self, axis_num: int) -> Index: """ Let's be explicit about this. """