xan, the CSV magician. Guillaume Plique, Béatrice Mazoyer, Laura Miguel, César Pichon, Anna Charles, Julien Pontoire, Evan Chevalarias (2022) | médialab Sciences Po
<p>xan is a command line tool that can be used to process large CSV files efficiently.</p><div class="vignette container_vignette-block">
<input type="checkbox" id="focus-figure-1" name="focus-figure" hidden />
<label for="focus-figure-1" title="" arial-label=""></label>
<figure class="vignette-block">
<img src="/static/xan-view_c80c2f4d-b758-4e88-a2fe-d70a9c263a0d.png" alt="Result of the "view" command that can be used to visualize a CSV file in the terminal"/><figcaption>Result of the "view" command that can be used to visualize a CSV file in the terminal</figcaption>
</figure>
</div><p>This tool is a fork of <a href="https://github.com/BurntSushi/xsv" target="_blank" rel="noopener noreferrer">xsv</a>, that was originally written by Andrew Gallant (aka <a href="https://github.com/BurntSushi" target="_blank" rel="noopener noreferrer">@BurntSushi</a>) and forked by the lab.</p><p>The tool was heavily rewritten and improved by the lab's engineer to fit our daily use-cases.</p><p>We added, among many other features, a dynamic scripting language that can be evaluated for each row of a file, external sorting, efficient reverse reading, k-way merging of already sorted files and many other things.</p><p>As a lot of our other tools produce and consume CSV files, it was only natural that we might want to find ways to mangle those files faster and without requiring ad-hoc scripting.</p><p>We therefore encourage anyone dealing with large CSV files to try our fork.</p>
médialab Sciences Po