pandas · Lesson 10.1 · Pro
shift, diff and pct_change
Compare each row with the one before it: day-over-day changes, growth rates and gaps between events.
In this lesson
- The previous row with shift
- Changes with diff and pct_change
- shift inside each group
- Looking ahead
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.