#df.reset_index(inplace=True) #if date is the index
dfMax=df[df['Element'].eq('TMAX')]
dfMin=df[df['Element'].eq('TMIN')]
за каждый месяц Независимо от года, используя groupby + Series.dt.month
dfMonths_max=dfMax.groupby(df['Date'].dt.month)['Data_Value'].max()
dfMonths_min=dfMin.groupby(df['Date'].dt.month)['Data_Value'].min()
print(dfMonths_max)
Date
1 150
12 11
Name: Data_Value, dtype: int64
print(dfMonths_min)
Date
1 -44
12 -17
Name: Data_Value, dtype: int64
за каждый год с использованием повторная выборка
dfMonths_by_age_max=dfMax.resample('M',on='Date')['Data_Value'].max()
dfMonths_by_age_min=dfMin.resample('M',on='Date')['Data_Value'].min()
print(dfMonths_by_age_max)
Date
2005-01-31 150.0
2005-02-28 NaN
2005-03-31 NaN
2005-04-30 NaN
2005-05-31 NaN
...
2015-08-31 NaN
2015-09-30 NaN
2015-10-31 NaN
2015-11-30 NaN
2015-12-31 11.0
Freq: M, Name: Data_Value, Length: 132, dtype: float64
print(dfMonths_by_age_min)
Date
2005-01-31 -44.0
2005-02-28 NaN
2005-03-31 NaN
2005-04-30 NaN
2005-05-31 NaN
...
2015-08-31 NaN
2015-09-30 NaN
2015-10-31 NaN
2015-11-30 NaN
2015-12-31 -17.0
Freq: M, Name: Data_Value, Length: 132, dtype: float64