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
).
Este ejercicio forma parte del curso
Python for R Users
Ejercicio interactivo práctico
Prueba este ejercicio completando el código de muestra.
# Print time_hour
print(____)