Python | Pandas Index.all() Last Updated : 16 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.all() function checks if all the elements in the index are true or not. It returns one single boolean value if axis is not specified. It returns true if each individual value in the index are true. It returns false if any of the values in the index is not true. Note : It treats 0 as false value. Syntax: Index.all(*args, **kwargs) Parameters : *args : These parameters will be passed to numpy.all **kwargs : These parameters will be passed to numpy.all Returns : all : bool or array_like (if axis is specified) A single element array_like may be converted to bool. Example #1: Use Index.all() function to check if all values are true in the index. Python3 # importing pandas as pd import pandas as pd # Creating the Index df = pd.Index([10, 44, 5, 25, 74]) # Print the Index df Output : Let's check if all the values in the index are true or not. Python3 1== # to check if index values are true or not df.all() Output : As we can see in the output, the function has returned true indicating all the values in the index are true. Example #2: Use Index.all() function to check if all the values are true in the index. In the index we are having some 0 values. Python3 # importing pandas as pd import pandas as pd # Creating the Index df = pd.Index([17, 69, 33, 5, 0, 74, 0]) # Print the dataframe df Output : Let's check if all the values in the index are true or it is having any false values as well. Python3 1== # to check if there is any false # value present in the index df.all() Output : Comment More infoAdvertise with us Next Article Python | Pandas Index.all() S Shubham__Ranjan Follow Improve Article Tags : Technical Scripter Python Python-pandas Python pandas-indexing Practice Tags : python Similar Reads Python | Pandas Index.any() 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.any() function checks if any of the elements in the index are true or not 2 min read Python | Pandas Index.equals() 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.equals() function determine if two Index objects contains the same elemen 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 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.flags 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.flags attribute return the status of all the flags for the given Index object. Syntax: Index.flags Parameter : None Returns : status o 2 min read Python | Pandas Index.append() Python is an excellent language for data analysis, primarily because of the fantastic ecosystem of data-centric Python packages. Pandas are one of those packages, making importing and analyzing data much easier. Pandas Index.append() The function is used to append a single or a collection of indices 2 min read Python | Pandas Index.delete() 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.delete() function returns a new object with the passed locations deleted. 2 min read Python | Pandas Index.copy() 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.copy() function make a copy of this object. The function also sets the na 2 min read Python | Pandas Index.identical() 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.identical() function determine if two Index objects contains the same ele 2 min read Python | Pandas Index.hasnans Pandas Index is an immutable ndarray implementing an ordered, sliceable set. It is the basic object that stores the axis labels for all panda's objects. Pandas Index.hasnans attribute return True if there is any missing value in the given Index object otherwise it returns False indicating there are 2 min read Like