csvstat --median data.csv

Category: Data Science & Analysis

csvstat --median data.csv

Print only the median of each column

The --median flag restricts csvstat output to the median, the middle value when a column is sorted. Because csvstat takes one operation flag at a time, run this separately from --mean. Medians resist outliers better than means for skewed data. Run both when you need the pair.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.