Python | Pandas Index.unique() Last Updated : 24 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.unique() function return unique values in the index. Uniques are returned in order of appearance, this does NOT sort. Syntax: Index.unique(level=None) Parameters : level : Only return values from specified level (for MultiIndex) Returns : Index without duplicates Example #1: Use Index.unique() function to return unique values in the index. Python3 # importing pandas as pd import pandas as pd # Creating the index idx = pd.Index(['Harry', 'Mike', 'Arther', 'Nick', 'Harry', 'Arther'], name ='Student') # Print the Index print(idx) Output : Let's find all the unique values in the Index. Python3 # find unique values in the index idx.unique() Output : The function has returned a new index having all the unique values of the original index. Example #2: Use Index.unique() function to find the unique values in the index Python3 # importing pandas as pd import pandas as pd # Creating the index idx = pd.Index([21, 10, 30, 40, 50, 10, 50]) # Print the Index print(idx) Output : Let's find all the unique values in the index Python3 # for finding the unique values in the index idx.unique() Output : The function has returned a new index that contains all of the unique values in the original index. Comment More infoAdvertise with us Next Article Python | Pandas Index.unique() S Shubham__Ranjan Follow Improve Article Tags : Technical Scripter Python Python-pandas Python pandas-indexing Practice Tags : python Similar Reads Python | Pandas Index.is_unique 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.is_unique attribute return True if the underlying data in the given Index object is unique else it return False. Syntax: Index.is_uniq 2 min read Python | Pandas Index.union() 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.union() function form the union of two Index objects and sorts if possibl 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.values 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.values attribute return an array representing the data in the given Index object. Syntax: Index.values Parameter : None Returns : an a 2 min read Python | Pandas Index.where 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.where function return an Index of same shape as self and whose corresponding entries are from self where cond is True and otherwise ar 2 min read Python | Pandas Index.shape 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.shape attribute return a tuple of the shape of the underlying data in the given Index object. Syntax: Index.shape Parameter : None Ret 2 min read Python | Pandas Index.repeat() 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.repeat() function repeat elements of an Index. The function returns a new 2 min read Python | Pandas Index.to_series() 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.to_series() function create a Series with both index and values equal to 2 min read Python | Pandas Series.is_unique 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 series is a One-dimensional ndarray with axis labels. The labels need not be un 2 min read Python | Pandas Index.get_values() 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_values() function returns the Index data as an numpy.ndarray. It retu 2 min read Like