mlr --csv top -n 5 -f score data.csv

Category: Data Science & Analysis

mlr --csv top -n 5 -f score data.csv

Show the 5 highest score values

The top verb lists the largest values of the fields named by -f, here the top 5 scores. Unlike sorting then taking the head, top is a single streaming pass and prints each value with a rank column. Add -g dept to get the top 5 per department. This is the quickest way to find record-setting rows in a CSV.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.