def select_season(df, season):
    """ Takes a data frame with a date time index and selects just the rows
        corresponding to the selected season.
    
    Args:
        df:     Data frame of flow data
        season: 'Spring' - M, A, M
                'Summer' - J, J, A
                'Autumn' - S, O, N
                'Winter' - D, J, F
    
    Returns:
        Data frame.
    """
    seasons_dict = {'spring':[3, 4, 5],
                    'summer':[6, 7, 8],
                    'autumn':[9, 10, 11],
                    'winter':[1, 2, 12]}
    
    return df[df.index.map(lambda x: x.month in seasons_dict[season.lower()])]