Python | Pandas Index.memory_usage() Last Updated : 07 Oct, 2021 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.memory_usage() function return the memory usage of the Index. It returns the sum of the memory used by all the individual labels present in the Index.f Syntax: Index.memory_usage(deep=False)Parameters : deep : Introspect the data deeply, interrogate object dtypes for system-level memory consumptionReturns : bytes used Example #1: Use Index.memory_usage() function to find the overall memory used by the Index object. 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 will use Index.memory_usage() function to find the memory usage of the idx object. Python3 # finding the memory used by the idx object idx.memory_usage() Output : The function has returned the value of 48 indicating that 48 bytes of memory are being used. Example #2: Use Index.memory_usage() function to check the memory usage of the MultiIndex object. Python3 # importing pandas as pd import pandas as pd # Creating the MultiIndex midx = pd.MultiIndex.from_arrays([['Mon', 'Tue', 'Wed', 'Thr'], [10, 20, 30, 40]], names =('Days', 'Target')) # Print the MultiIndex midx Output : Now we will check the amount of memory used by the midx object. Python3 # return the total memory used by the multi-index object midx.memory_usage() Output : As we can see in the output, the function has returned 180 indicating that the midx object is using 180 bytes of memory. Comment More infoAdvertise with us Next Article Python | Pandas Index.memory_usage() S Shubham__Ranjan Follow Improve Article Tags : Technical Scripter Python Python-pandas Python pandas-indexing Practice Tags : python Similar Reads Python | Pandas dataframe.memory_usage() 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.memory_usage() function return the memory usage of each column in byte 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 Series.memory_usage() 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.memory_usage() function retur 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.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.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.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.summary() 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.summary() function return a summarized representation of the Index. This 2 min read Like