def cummax(series):
    """
    Calculates cumulative maximum of values. Equivalent to
    `series.expanding().max()`.

    Args:
        series: column to compute cumulative maximum for.
    """

    maxes = series.expanding().max()
    return maxes