The shift amount,
n, can be both positive and negative. If positive,
a “lag” column is created, if negative it will be a “lead” column.
This function is group-aware, i.e. in the presence of a groupby it will perform the shift separately within each group.