Python | Pandas Index.max() Last Updated : 17 Dec, 2018 Comments Improve Suggest changes Like Article Like Report Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas Index.max() function returns the maximum value of the Index. The function works with both numerical as well as the string type objects. In case of string type object it returns the string which has highest value in lexicographical order. Syntax: Index.max() Parameters : Doesn't take any parameter. Returns : scalar: Maximum value. Example #1: Use Index.max() function to find the maximum element in the given Index. Python3 # importing pandas as pd import pandas as pd # Creating the Index idx = pd.Index(['Labrador', 'Beagle', 'Mastiff', 'Lhasa', 'Husky', 'Beagle']) # Print the Index idx Output : Now we find the max value in the given Index. Python3 # return max value. idx.max() Output : As we can see in the output, the function has returned 'Mastiff' which has the highest lexicographical order among the values present in the Index. Example #2: Use Index.max() function to find the maximum value in the Index. Python3 # importing pandas as pd import pandas as pd # Creating the Index idx = pd.Index([17, 69, 33, 5, 0, 74, 0]) # Print the Datetime Index idx Output : Now we will find the maximum value among the labels of the Index. Python3 # the function will return the # maximum value present in the Index idx.max() Output : As we can see in the output, the function has returned 74 which is the largest value among the labels of the Index. Comment More infoAdvertise with us Next Article Python | Pandas Index.max() S Shubham__Ranjan Follow Improve Article Tags : Technical Scripter Python Python-pandas Python pandas-indexing Practice Tags : python Similar Reads Python | Pandas Index.min() Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas Index.min() function returns the minimum value of the Index. The function works 2 min read Python | Pandas Index.ndim Pandas Index is an immutable ndarray implementing an ordered, sliceable set. It is the basic object which stores the axis labels for all pandas objects. Pandas Index.ndim attribute return the number of dimensions of the underlying data in the given Index object. By definition it is 1. Syntax: Index. 2 min read Python | Pandas Index.nbytes Pandas Index is an immutable ndarray implementing an ordered, sliceable set. It is the basic object which stores the axis labels for all pandas objects. Pandas Index.nbytes attribute return the number of bytes required to store the underlying data of the given Index object. Syntax: Index.nbytes Para 2 min read Python | Pandas Index.itemsize Pandas Index is an immutable ndarray implementing an ordered, sliceable set. It is the basic object which stores the axis labels for all pandas objects. Pandas Index.itemsize attribute return the size of the dtype of the items of the underlying data in the given Index object. Syntax: Index.itemsize 2 min read Python | Pandas Index.asof() Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas Index.asof() function returns return the label from the index, or, if not prese 2 min read Python | Pandas Index.size Pandas Index is an immutable ndarray implementing an ordered, sliceable set. It is the basic object which stores the axis labels for all pandas objects. Pandas Index.size attribute return the number of elements in the underlying data of the given Index object. Syntax: Index.size Parameter : None Ret 2 min read Python | Pandas Index.data Pandas Index is an immutable ndarray implementing an ordered, sliceable set. It is the basic object which stores the axis labels for all pandas objects. Pandas Index.data attribute return the data pointer of the underlying data of the given Index object. Syntax: Index.data Parameter : None Returns : 2 min read Python | Pandas dataframe.max() Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas dataframe.max() function returns the maximum of the values in the given object. 2 min read Python | Pandas Series.idxmax() Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label-based indexing and provides a host of methods for performing operations involving the index. Pandas Series.idxmax() function return the 2 min read Python | Pandas Index.get_loc() Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas Index.get_loc() function return integer location, slice or boolean mask for req 3 min read Like