Memory usage of the values.
Introspect the data deeply, interrogate object dtypes for system-level memory consumption.
See also
numpy.ndarray.nbytesTotal bytes consumed by the elements of the array.
Notes
Memory usage does not include memory consumed by elements that are not components of the array if deep=False or if used on PyPy
Examples
>>> idx = pd.Index([1, 2, 3])
>>> idx.memory_usage()
24
© 2008–2011, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
© 2011–2025, Open source contributors
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/2.3.0/reference/api/pandas.Index.memory_usage.html