Exploratory Community

How to shift all values in a column downward by one row while other columns remain unchanged

#1

To shift all values in a column downward by one row while the other columns remain unchanged, you can use lag function.

In below example, it shifts all values in the carb column downward by one row while the res

You can use lead function to shift the column upward.