def memory_usage(df):
    """ Calculate memory used by pd.DataFrame.
    Params:
        df: pd.DataFrame
    Returns:
        str memory usage
    """
    usage = df.memory_usage(deep=True).sum() / 1024 ** 2
    return '{:0.2f} MB'.format(usage)
