xan

médialab Sciences Po·medialab.xan

The CSV magician

xan is a command line tool that can be used to process CSV files directly from the shell. It has been written in Rust to be as fast as possible, use as little memory as possible, and can very easily handle large CSV files (Gigabytes). It leverages a novel SIMD CSV parser and is also able to parallelize some computations (through multithreading) to make some tasks complete as fast as your computer can allow. It can easily preview, filter, slice, aggregate, sort, join CSV files, and exposes a large collection of composable commands that can be chained together to perform a wide variety of typical tasks. xan also offers its own expression language so you can perform complex tasks that cannot be done by relying on the simplest commands. This minimalistic language has been tailored for CSV data and is way faster than evaluating typical dynamically-typed languages such as Python, Lua, JavaScript etc. Note that this tool is originally a fork of BurntSushi's xsv, but has been nearly entirely rewritten at that point, to fit SciencesPo's médialab use-cases, rooted in web data collection and analysis geared towards social sciences (you might think CSV is outdated by now, but read our love letter to the format before judging too quickly). xan therefore goes beyond typical data manipulation and expose utilities related to lexicometry, graph theory and even scraping. Beyond CSV data, xan is able to process a large variety of CSV-adjacent data formats from many different disciplines such as web archival (.cdx) or bioinformatics (.vcf, .gtf, .sam, .bed etc.). xan is also able to convert to & from many data formats such as json, excel files, numpy arrays etc. using xan to and xan from. See this section for more detail. Finally, xan can be used to display CSV files in the terminal, for easy exploration, and can even be used to draw basic data visualisations.

winget install --id medialab.xan --exact --source winget

Latest 0.61.0·September 11, 2026

Release Notes

Features

  • Support for .mtx (Matrix Market) files.
  • Adding geometric_mean & harmonic_mean aggregation functions. Fixes
  • Fixing xan rename with non-comma delimiters.
  • Fixing xan from -f=parquet not converting timestamp columns.
  • Fixing open-ended moonblade slicing.
  • Fixing xan parallel (cat|map) not working with -R/--run.
  • Fixing xan parallel -R/--run not spawning checker thread.
  • Fixing xan cat rows (-I|-U) -S/--source-column. Performance
  • Improving performance of xan freq & xan p freq. Quality of Life
  • Better moonblade error messages when values are not yet materialized.
  • Better xan count -H/--human-readable.

Installer type: zip

x64—5F7BEF4DCFFBFB3A3A937AC180ED76CDF966CB13647251BEFFDDB84D01C1AE54

Details

Homepage
https://github.com/medialab/xan
License
Unlicense, MIT
Publisher
médialab Sciences Po
Support
https://github.com/medialab/xan/issues
Copyright
Copyright (c) 2015-2026 Andrew Gallant, Guillaume Plique

Tags

csvdatadatasciencediagramgraphgraphicsplotstatisticsstats

Older versions (10)

0.60.0
x64—E7AD980FB033381F0AE8445330328E086F92443828F89B3E5A6777409B2EC3BD
0.59.0
x64—A23E45744DC804745318C927BE1E3C657C2592BE3622073A59A481AA5E9B8423
0.58.0
x64—1390BD9202799FD7469BB9163039998AD7F96BC4ED3CE2BF2BB8550EC3FC167F
0.57.1
x64—D2539B421CEA8CAB24BAF5B70CAD3CB299B4997EC38384336C0779CD0A4E7CAC
0.57.0
x64—DC07694298DEA6A777A3C70AED06818FBDD036D5A0FBD38C37027149EFE0A5B6
0.56.0
x64—30447BB352627DD70AFB6B9DEC4BC52DA2D27F6A5175DA944E67133C1D183490
0.55.0
x64—28766FB75AD0F1A046A9F86D0D81398A484DC88003CB09D33063B6E45F65E00C
0.54.1
x64—7259A235660AC837EFCC848AE6A9E6394C767931D7E27E11621AE9F413DB68E7
0.54.0
x64—766B9BE6224E7ACD118196014C2562BBD8ABAADD0A414A3FB5F83A32B0B068DC
0.53.0
x64—5D168D53F0ED6B87A61EA96FD7AECE7DC53B05D6DEB6D50CFCC3E778DAD340F0