Python | Pandas Index.nbytes Last Updated : 20 Feb, 2019 Comments Improve Suggest changes Like Article Like Report 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 Parameter : None Returns : number of bytes needed to store the data Example #1: Use Index.nbytes attribute to find out the number of bytes required to store the underlying data of the given Index object. Python3 # importing pandas as pd import pandas as pd # Creating the index idx = pd.Index(['Melbourne', 'Sanghai', 'Lisbon', 'Doha', 'Moscow', 'Rio']) # Print the index print(idx) Output : Now we will use Index.nbytes attribute to find out the number of bytes required to store the data in the given Index object. Python3 1== # return the number of bytes occupied # by idx object result = idx.nbytes # Print the result print(result) Output : As we can see in the output, the Index.nbytes attribute has returned 48, indicating that 48 bytes are needed to store the data in the given Index object. Example #2 : Use Index.nbytes attribute to find out the number of bytes required to store the underlying data of the given Index object. Python3 # importing pandas as pd import pandas as pd # Creating the index idx = pd.Index([900 + 3j, 700 + 25j, 620 + 10j, 388 + 44j, 900]) # Print the index print(idx) Output : Now we will use Index.nbytes attribute to find out the number of bytes required to store the data in the given Index object. Python3 1== # return the number of bytes occupied # by idx object result = idx.nbytes # Print the result print(result) Output : As we can see in the output, the Index.nbytes attribute has returned 40, indicating that 40 bytes are needed to store the data in the given Index object. Comment More infoAdvertise with us Next Article Python | Pandas Index.nbytes S Shubham__Ranjan Follow Improve Article Tags : 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.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.insert() 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.insert() function make new Index inserting new item at location. This fun 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.nunique() 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.nunique() function return number of unique elements in the object. It ret 2 min read Python | Pandas Index.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 Index.max() function returns the maximum value of the Index. The function works 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 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.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 Like