Session Ready
Exercise

Sunny or cloudy

On average, how much hotter is it when the sun is shining? In this exercise, you will compare temperatures on sunny days against temperatures on overcast days.

Your job is to use Boolean selection to filter for sunny and overcast days, and then compute the difference of the mean daily maximum temperatures between each type of day.

The DataFrame df_clean from previous exercises has been provided for you. The column 'sky_condition' provides information about whether the day was sunny ('CLR') or overcast ('OVC').

Instructions 1/3
undefined XP
  • 1
  • 2
  • 3
  • Get the cases in df_clean where the sky is clear. That is, when 'sky_condition' equals 'CLR', assigning to is_sky_clear.
  • Use .loc[] to filter df_clean by is_sky_clear, assigning to sunny.
  • Resample sunny by day ('D'), and take the max to find the maximum daily temperature.