Reverse Columns#
Description:
Flip the order of select columns or all of the columns
Function:
Reverse_Columns(table = string, cols = list)
Parameters:
Table: Table name on which to perform function
Columns to Reverse: Columns to reverse the order
Example:
Reverse_Columns(table = Budget, cols = ["Geo", "Business"])
Date |
Geo |
Business |
Revenue |
|---|---|---|---|
1/1/2024 |
USA |
Energy |
950 |
2/1/2024 |
USA |
Manufacturing |
800 |
3/1/2024 |
USA |
Energy |
1200 |
4/1/2024 |
USA |
Manufacturing |
900 |
Date |
Business |
Geo |
Revenue |
|---|---|---|---|
1/1/2024 |
Energy |
USA |
950 |
2/1/2024 |
Manufacturing |
USA |
800 |
3/1/2024 |
Energy |
USA |
1200 |
4/1/2024 |
Manufacturing |
USA |
900 |