pandas.Series.memory_usage

pandas 3.1.1 · Series and accessors · method

Report bytes accounted for by pandas. For object data, deep=True includes more of the referenced values.

Call syntax

Series.memory_usage(index=True, deep=False)

Run the example

Edit the example and select Run Python to see the result.

Parameters

ParameterRequirementAccepted values and behavior
index Optional
Positional or keyword
Default True
bool

Supply row labels or control how existing row labels are used.

deep Optional
Positional or keyword
Default False
bool

Choose whether to include or copy underlying object data where supported.

Returns

int