def max(self, axis=None, skipna=True, *args, **kwargs):
nv.validate_max(args, kwargs)<EOL>nv.validate_minmax_axis(axis)<EOL>if not len(self):<EOL><INDENT>return self._na_value<EOL><DEDENT>i8 = self.asi8<EOL>try:<EOL><INDENT>if len(i8) and self.is_monotonic:<EOL><INDENT>if i8[-<NUM_LIT:1>] != iNaT:<EOL><INDENT>return self._box_func(i8[-<NUM_LIT:1>])<EOL><DEDENT><DEDENT>if self.hasnans:<EOL><INDENT>if skipna:<EOL><INDENT>max_stamp = self[~self._isnan].asi8.max()<EOL><DEDENT>else:<EOL><INDENT>return self._na_value<EOL><DEDENT><DEDENT>else:<EOL><INDENT>max_stamp = i8.max()<EOL><DEDENT>return self._box_func(max_stamp)<EOL><DEDENT>except ValueError:<EOL><INDENT>return self._na_value<EOL><DEDENT>
Return the maximum value of the Index or maximum along
an axis.

See Also
--------
numpy.ndarray.max
Series.max : Return the maximum value in a Series.