mem_usage

hhpy.main.mem_usage(pandas_obj, *args, **kwargs) → str[source]

Get memory usage of a pandas object

Parameters:
  • pandas_obj – Pandas object to get the memory usage of
  • args – passed to size()
  • kwargs – passed to size()
Returns:

memory usage of a pandas object formated as string

Examples

>>> import seaborn as sns
>>> diamonds = sns.load_dataset('diamonds')
>>> mem_usage(diamonds)
'12.62 MB'