df.shift(periods=1)
shifts all rows (except index) down by 1df.shift(periods=-1)
shifts all rows (except index) up by 1df.shift(periods=1, freq="M")
shifts all rows towards the end of the month
Search
Apr 23, 20241 min read
df.shift(periods=1)
shifts all rows (except index) down by 1df.shift(periods=-1)
shifts all rows (except index) up by 1df.shift(periods=1, freq="M")
shifts all rows towards the end of the month