w3resource

Pandas Series: memory_usage() function

Memory usage of Pandas Series

The memory_usage() function is used to get the memory usage of the Series.

The memory usage can optionally include the contribution of the index and of elements of object dtype.

Syntax:

Series.memory_usage(self, index=True, deep=False)
Pandas Series memory_usage() function

Parameters:

Name Description Type Default Value Required / Optional
index Specifies whether to include the memory usage of the Series index. bool True Required
deep If True, introspect the data deeply by interrogating object dtypes for system-level memory consumption, and include it in the returned value. bool False: 0 Optional

Returns: int - Bytes of memory consumed.

Example:


Download the above Notebook from here.



Inviting useful, relevant, well-written and unique guest posts