def robust_scale(df):
    """Return copy of `df` scaled by (df - df.median()) / MAD(df) where MAD is a function returning the median absolute deviation."""
    median_subtracted = df - df.median()
    mad = median_subtracted.abs().median()
    return median_subtracted/mad