Session Ready
Exercise

Recode dates

Now let's look at another dataset in the nycflights13 datasets, specifically the flights dataset. This dataset gives us the time when a particular flight departed from one of the New York City airports (JFK, LGA, EWR), it's scheduled departure and arrival times, and the departure and arrival delays. You'll begin by investigating to determine if there are any seasonal patterns for delays.

Here are the cutoff times for each season in the United States.

SPRING EQUINOX March 20
SUMMER SOLSTICE June 21
FALL EQUINOX September 22
WINTER SOLSTICE December 21

We defined the get_season() function that converts a given date to a season (one of winter, spring, summer, and fall).

Instructions 1/3
undefined XP
  • 1
  • 2
  • 3

Print the 'time_hour' of the flights DataFrame.