Lesson 12.4 · Pro
Streaks: consecutive days and winning runs
The "gaps and islands" trick finds runs of consecutive days or consecutive wins.
In this lesson
- The trick: date minus row number
- Winning streaks: two row numbers
Go Pro to read this lesson
Pro unlocks every lesson and practice problem in SQL, Python, pandas and NumPy, with answers and step-by-step explanations.