mlr --csv histogram -f score --lo 0.7 --hi 1.0 --nbins 3 data.csv

Category: Data Science & Analysis

mlr --csv histogram -f score --lo 0.7 --hi 1.0 --nbins 3 data.csv

Build a 3-bin histogram of the score column

The histogram verb bins the score field into a fixed number of buckets between --lo and --hi, here 3 bins from 0.7 to 1.0. Output lists each bin's range and the count of rows in it, the raw material of a distribution chart. Choose bounds that cover the data's full range, or rows outside them are ignored. Feed the output to a plotting tool for a bar chart.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.