Growth questions compare a value with an earlier one:
s.shift(1) moves every value down one row, so each row sees the previous value. shift(7) on daily data gives the same weekday last week.
s.diff() is s - s.shift(1): the change in units.
s.pct_change() is s / s.shift(1) - 1: the growth rate. pct_change(7) compares with 7 rows earlier.
The first value (or first 7) is NaN, because there's nothing to compare with. A previous value of 0 gives inf, which is worth checking for before you report a growth rate.
With several groups, shift within each group: df.groupby("customer_id")["revenue"].shift(1) gives each customer's previous order, never another customer's.