def cummean(series):
    """
    Calculates cumulative mean of values. Equivalent to
    `series.expanding().mean()`.

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

    means = series.expanding().mean()
    return means