<h1 id="xsv-for-fast-csv-manipulations---part-1-basic-usage">XSV for fast CSV manipulations - Part 1: Basic Usage</h1>
<blockquote>
<p><a href="https://github.com/BurntSushi/xsv" class="uri">https://github.com/BurntSushi/xsv</a></p>
</blockquote>
<h2 id="introduction">Introduction</h2>
<p>xsv is a command line program for indexing, slicing, analyzing, splitting and joining CSV files. Commands should be simple, fast and composable:</p>
<ol>
<li>Simple tasks should be easy.</li>
<li>Performance trade offs should be exposed in the CLI interface.</li>
<li>Composition should not come at the expense of performance.</li>
</ol>
<p>We will be using the CSV file provided in the <a href="https://burntsushi.net/stuff/worldcitiespop.csv">documentation</a>.</p>
<h2 id="commands-covered-in-this-episode">Commands covered in this episode</h2>
<ul>
<li><strong>fixedlengths</strong> - Force a CSV file to have same-length records by either padding or truncating them.</li>
<li><strong>fmt</strong> - Reformat CSV data with different delimiters, record terminators or quoting rules. (Supports ASCII delimited data.)</li>
<li><strong>input</strong> - Read CSV data with exotic quoting/escaping rules.</li>
<li><strong>partition</strong> - Partition CSV data based on a column value.</li>
<li><strong>split</strong> - Split one CSV file into many CSV files of N chunks.</li>
<li><strong>sample</strong> - Randomly draw rows from CSV data using reservoir sampling (i.e., use memory proportional to the size of the sample).</li>
<li><strong>cat</strong> - Concatenate CSV files by row or by column.</li>
</ul>
