the code in the mean_temperatures is wrong:
0 # One Solution
1 mean_temperatures = {}
2
3 for month in range(1, 13):
4 mean_temperatures[month] = weather_df.loc[weather_df['Date/Time'].dt.month == month, 'Temp (C)'].mean()
5
6 pd.Series(mean_temperatures)
Code in line 4 should be: mean_temperatures[month] = weather_df.loc[pd.to_datetime(weather_df['Date/Time']).dt.month == month, 'Temp (C)'].mean()
the code in the mean_temperatures is wrong: 0 # One Solution 1 mean_temperatures = {} 2 3 for month in range(1, 13): 4 mean_temperatures[month] = weather_df.loc[weather_df['Date/Time'].dt.month == month, 'Temp (C)'].mean() 5 6 pd.Series(mean_temperatures)
Code in line 4 should be: mean_temperatures[month] = weather_df.loc[pd.to_datetime(weather_df['Date/Time']).dt.month == month, 'Temp (C)'].mean()