mlr --csv reorder -f name,score data.csv

Category: Data Science & Analysis

mlr --csv reorder -f name,score data.csv

Move the name and score columns to the front

The reorder verb moves the fields named by -f to the front of each record, keeping every other column in its original relative order. This is useful when a tool expects certain columns first. The remaining fields follow in their original sequence. Column order is cosmetic for most tools but matters for fixed-position parsers.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.