pandas.DataFrame.memory_usage
pandas 3.1.1 · DataFrame · method
Report bytes accounted for by pandas. For object data, deep=True includes more of the referenced values.
Call syntax
DataFrame.memory_usage(index=True, deep=False)Run the example
Edit the example and select Run Python to see the result.
Parameters
| Parameter | Requirement | Accepted 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
Series