Dataframe
 
0.15

reorder

Edit page Last modified: 14 January 2025

Returns DataFrame with a new order of selected columns.

df.reorder { age..isHappy }.byName()

When a subset of columns is selected they will be reordered among their original positions. Positions of other columns will not change.

If selected columns belong to different column groups they will be reordered within their groups, so column grouping will be preserved.

When exactly one ColumnGroup is selected, reordering is applied to its nested columns.