def add_season_steps(df, season_length):
    """
    Adds a column to the DataFrame containing the season step depending on the given season_length.
    The season step determines the position of each column within a season. It ranges from 0 to season_length - 1.

    :param df: pandas DataFrame with a DateTime index and a column containing the time series values.
    :param season_length: an integer specifying the number of rows that make up one season
    :return: pandas DataFrame
    """
    df.loc[:, 'season_step'] = df.index % season_length
    return df