@classmethod
def rolling_mean(cls, df, columns, groupby_column, n=0, min_periods=3):
    """
        Returns a DataFrame with the rolling mean of some columns.
        df: Dataframe.
        columns: (str, list) Column names to apply the rolling mean.
        column_id: (str, list) Column names to use as a grouper.
        n: Window for the rolling. 0 is equivalent to a rolling historical mean.
        min_periods: Minimum number of periods to show the rolling.
        """
    if isinstance(columns, str):
        columns = [columns]
    if isinstance(groupby_column, str):
        groupby_column = [groupby_column]
    all_columns = columns + groupby_column
    if n > 0:
        return df[all_columns].groupby(groupby_column).rolling(min_periods=
            min_periods, window=n).mean().reset_index(drop=True)[columns]
    else:
        return df[all_columns].groupby(groupby_column).expanding(min_periods
            =min_periods).mean().reset_index(drop=True)[columns]
