csvstat doen't give counts for some columns
Created by: nealmcb
csvstat is great, and usually gives a sense of the mode of the data, via a count of how many rows have the most frequent values:
4. LAST_NAME
Nulls: True
Unique values: 307123
5 most frequent values:
SMITH: 28155
JOHNSON: 23713
MARTINEZ: 18465
MILLER: 16916
BROWN: 15428
Max length: 28
But sometimes it doesn't, perhaps when there less than some predefined number of unique values:
28. STATUS
Nulls: False
Values: Active, Inactive
I'd like to get counts of the top 5 most frequent values for all columns, as long as there are any repeated values.