🚀 LEVEL UP TO SENIOR:Unlock 500+ Advanced Practical Challenges & Expert Masterclasses.
🎓 COURSERA PARTNER:Earn professional Google, Meta, and IBM certificates to supercharge your resume.
REFERENCEpandas

pandas Documentation

📖 INDEX

No matches found.
LOADING ENGINE...

df.memory_usage()

AI & DATA SCIENCE // df-memory-usage

Return the memory usage of each column in bytes.

Syntax

print(df.memory_usage(deep=True))

Examples

Example 01Basic Usage
print(df.memory_usage(deep=True))

Best Practices

  • Use vectorized operations over iterations (e.g. iterrows()) for performance.
  • Always verify memory usage when loading large files.