Reorder
Function reorders variables (columns) in the dataset horizontally.
Properties
Variables |
Property defines new order of variables in dataset. |
Keywords
Reorder Columns, Reorder Variables, horizontal table ordering, reorder, table
See Also
Select,
Rename,
Arrange
Video-tutorial
How to Reorder Columns in Excel Spreadsheet
If you want to see individual table columns in a different order, Reorder function will help you. You can use it to specify the order of individual dataset variables. If you want to use this feature directly in the spreadsheet, it is not a simple (or quick) task. Inside the Reshape.XL add-in it is very simple. In the example we use the following table.
To change the columns order, click the Reorder button in the ribbon toolbar tab Variables.
Pressing this button will display the function in the sidebar. Clicking on it will show the individual variables (columns) from the input table in the Properties Panel. Their order in this list determines their position in the final output table. If you click on the selected variable in the list, the help buttons at the end of each row are displayed. Using them you can change the order of variables. With the Arrows buttons, you can move the selected variable line up or down. Use the "Nr." button to enter the row number to which the variable will be shifted.
The following example shows a function application, where we’ve moved the categorical variables at the beginning of the table.
As with the Select function, it is possible to select variables using auxiliary features that are hidden in the contextual menu.
The Reorder function has a clear purpose and its use is very easy. If you want to select variables, use the Select function. If you want to rename them, you can use the Rename feature.
For instance, if you use SQL language for data wrangling, you can use these features at once. The disadvantage of this procedure is that the resulting code can become disarranged. In the case of the Reshape.XL add-in, you have these features separated and each one (Select, Reorder, Rename) serves only one purpose. This separation gives you better readability and reproducibility of the data wrangling process.