xsv index data.csv

Category: Data Science & Analysis

xsv index data.csv

Create a fast random-access index file

The index command builds data.csv.idx, a sidecar index that lets other xsv commands jump to any row instantly. It costs one pass over the file but makes repeated slice and sample operations much faster on huge CSVs. The index is rebuilt automatically when the data file changes size. This is the xsv performance trick for multi-gigabyte files.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.