xsv partition dept part data.csv

Category: Data Science & Analysis

xsv partition dept part data.csv

Split a CSV into one file per dept value

The partition command writes one output file per distinct value of the selected column, here dept, into the part directory. Every output file keeps the header and is named after the value it contains. This is the classic way to split work per category before parallel processing. Choose the column by name rather than index for readable filenames.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.