File tree Expand file tree Collapse file tree 1 file changed +30
-1
lines changed Expand file tree Collapse file tree 1 file changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -787,7 +787,36 @@ def empty(self):
787
787
return not self .size
788
788
789
789
def max (self ):
790
- """ The maximum value of the object """
790
+ """
791
+ Return the maximum value of the Index.
792
+
793
+ Returns
794
+ -------
795
+ scalar
796
+ Maximum value.
797
+
798
+ See Also
799
+ --------
800
+ Index.min : Return the minimum value in an Index.
801
+ Series.max : Return the maximum value in a Series.
802
+ DataFrame.max : Return the maximum values in a DataFrame.
803
+
804
+ Examples
805
+ --------
806
+ >>> idx = pd.Index([3, 2, 1])
807
+ >>> idx.max()
808
+ 3
809
+
810
+ >>> idx = pd.Index(['c', 'b', 'a'])
811
+ >>> idx.max()
812
+ 'c'
813
+
814
+ For a MultiIndex, the maximum is determined lexicographically.
815
+
816
+ >>> idx = pd.MultiIndex.from_product([('a', 'b'), (2, 1)])
817
+ >>> idx.max()
818
+ ('b', 2)
819
+ """
791
820
return nanops .nanmax (self .values )
792
821
793
822
def argmax (self , axis = None ):
You can’t perform that action at this time.
0 commit comments