December 2018
Beginner to intermediate
682 pages
18h 1m
English
In this recipe, we find the longest consecutive streak of on-time flights for each airline at each origin airport. This requires each value in a column to be aware of the value immediately following it. We make clever use of the diff and cumsum methods in order to find streaks before applying this methodology to each of the groups.