# xarray.CFTimeIndex.memory_usage

#### CFTimeIndex.memory_usage(deep=False)[[source]](https://github.com/pydata/xarray/blob/main/xarray/../.pixi/envs/doc/lib/python3.15/site-packages/pandas/core/indexes/base.py#L5465-L5505)

Memory usage of the values.

Returns the number of bytes consumed by the Index. When `deep=True`,
the memory consumption of underlying objects referencing this Index
(e.g., the characters of object-dtype values) is included.

* **Parameters:**
  **deep** ([`bool`](https://docs.python.org/3/builtins/functions.html#bool), *default* [`False`](https://docs.python.org/3/builtins/constants.html#False)) – Introspect the data deeply, interrogate
  object dtypes for system-level memory consumption.
* **Returns:**
  `bytes used` – Returns memory usage of the values in the Index in bytes.

#### SEE ALSO
[`numpy.ndarray.nbytes`](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.nbytes.html#numpy.ndarray.nbytes)
: Total 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

<div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesShowIframe('8727cbec-b2f1-4f03-84c9-b800f4129106','3ad3eeaf-2193-4099-8dcf-cac7186b1cdd','f51075c6-c963-4216-af89-fc53c27c7515','../lite/tree/../notebooks/index.html?path=f8e2ec26_8acb_4ecf_a4cf_9199f6e9d20d.ipynb','None')">Try it in your browser!</button></div>
```pycon
>>> idx = pd.Index([1, 2, 3])
>>> idx.memory_usage()
24
```

<div id="f51075c6-c963-4216-af89-fc53c27c7515" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('8727cbec-b2f1-4f03-84c9-b800f4129106','f51075c6-c963-4216-af89-fc53c27c7515')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('8727cbec-b2f1-4f03-84c9-b800f4129106','f51075c6-c963-4216-af89-fc53c27c7515')">Open In Tab</button></div><div id="3ad3eeaf-2193-4099-8dcf-cac7186b1cdd" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
