mlr --csv cut -f name,age data.csv

Category: Data Science & Analysis

mlr --csv cut -f name,age data.csv

Keep only the name and age columns

The cut verb keeps just the fields named by -f and drops everything else, like a column-wise filter. Field order in the output follows the input unless -o is used to reorder. This is the Miller way to slim wide files before analysis. Use cut -x to do the inverse and drop the named fields instead.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.