csvsort -c age -r data.csv

Category: Data Science & Analysis

csvsort -c age -r data.csv

Sort rows by age, descending

The -r flag reverses csvsort's ordering, putting the largest age first. Combine -c and -r for ranked reports, such as a top-N list after slicing. Type-aware sorting means 100 orders after 20 for a numeric column. This is the csvkit way to rank records before cutting off a top-N.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.