diff --git a/pandas/core/base.py b/pandas/core/base.py index fd039480fc6f1..9b50687edecd8 100644 --- a/pandas/core/base.py +++ b/pandas/core/base.py @@ -787,7 +787,36 @@ def empty(self): return not self.size def max(self): - """ The maximum value of the object """ + """ + Return the maximum value of the Index. + + Returns + ------- + scalar + Maximum value. + + See Also + -------- + Index.min : Return the minimum value in an Index. + Series.max : Return the maximum value in a Series. + DataFrame.max : Return the maximum values in a DataFrame. + + Examples + -------- + >>> idx = pd.Index([3, 2, 1]) + >>> idx.max() + 3 + + >>> idx = pd.Index(['c', 'b', 'a']) + >>> idx.max() + 'c' + + For a MultiIndex, the maximum is determined lexicographically. + + >>> idx = pd.MultiIndex.from_product([('a', 'b'), (2, 1)]) + >>> idx.max() + ('b', 2) + """ return nanops.nanmax(self.values) def argmax(self, axis=None):