Repository navigation
Conversion and IO
Tier: Intermediate
Commands covered: excel, readstat, writestat, to, json, jsonl, tojsonl, snappy, geoconvert, prompt, clipboard
Note
Per-command flag reference lives in /docs/help/. This page is the workflow layer — when to reach for each command and how they compose.
These commands bridge between CSV and other formats: Excel/ODS, the SAS/Stata/SPSS statistical formats (both directions), JSON (array & JSONL), Parquet, SQLite, PostgreSQL, Snappy-compressed, GeoJSON/SHP, plus the OS clipboard and file picker dialogs.
The clipboard command is also covered in Selection & Inspection → clipboard. The geoconvert command is also covered in Geospatial → geoconvert. This page focuses on the I/O angle.
| If you want to… | Use | Notes |
|---|---|---|
| Convert Excel / ODS sheet → CSV | excel |
Pick sheet by name (case-insensitive) or index |
| Convert SAS / Stata / SPSS file → CSV | readstat |
.sas7bdat, .xpt/.xpt5/.xpt8, .dta, .sav/.zsav/.por; --dictionary also writes a JSON Schema data dictionary |
| Write a CSV as SPSS / Stata / SAS transport | writestat |
.sav/.por, .dta, .xpt — restores labels & missing values from a readstat --dictionary
|
| CSV → Parquet / SQLite / Postgres / Excel / ODS / Data Package | to |
Parquet supports zstd / gzip / snappy / lz4raw |
| JSON array → CSV | json |
Use --jaq for nested / awkward JSON |
| JSONL → CSV | jsonl |
First line determines headers |
| CSV → JSONL with smart type inference | tojsonl |
Uses the stats cache for type inference |
| Streaming Snappy compress / decompress | snappy |
Most qsv commands auto-handle .sz
|
| CSV ↔ GeoJSON / SHP / SVG | geoconvert |
See Geospatial |
| OS file picker for input or output | prompt |
Pairs well with clipboard and lens
|
| Read/write the OS clipboard | clipboard |
See Selection & Inspection |
Export an Excel (.xls, .xlsx, .xlsm, .xlsb) or LibreOffice (.ods) sheet to CSV. The first non-empty row is treated as the header.
Example: export the first sheet of a workbook
qsv excel input.xlsx --output output.csvNote
If excel fails before writing (a missing table or sheet, an invalid range, --fill-merged on ODS), an existing --output file is left intact. An error while writing, such as a full disk, can still leave partial output (#5143).
Example: export by sheet name (case-insensitive)
qsv excel --sheet 'Sheet 3' input.xlsx > sheet3.csvExample: export a sheet by negative index (last sheet)
qsv excel --sheet -1 input.xlsx > last_sheet.csvExample: export every sheet to its own CSV (one shell loop)
for i in $(qsv excel --metadata input.xlsx | qsv select sheet_name | qsv behead); do
qsv excel --sheet "$i" input.xlsx --output "${i}.csv"
doneExample: repeat merged-cell values instead of leaving them empty (30.0.0: #5141)
qsv excel --fill-merged input.xlsx > output.csvBy default only a merged region's top-left cell has a value; its other cells export empty. --fill-merged copies that value into the whole region, so a category label merged down rows, or a heading merged across columns, repeats on every row or column it covers.
- Works for XLS, XLSX, XLSM and XLSB, with
--sheet,--rangeand--table. - Only the part of a region inside the exported cells is filled. A region whose top-left cell is outside them stays empty.
- A header merged across columns repeats its name (
Q1,Q1,Q1). Pipe the output toqsv safenamesto make the names unique (it also lowercases the ones it renames). - ODS exports are rejected because calamine can't read ODS merged regions (
--metadataon ODS still works). Overlapping merged regions within the exported cells, which Excel never writes, are an error.
excel changes in 30.0.0 (calamine 0.39, #5140)
-
Behavior change:
--tableno longer drops the table's first data row, so a table exports one more row than in 29.0.0. A script that added the missing row back will get it twice. - XLSB formula cells with a cached error (e.g. a
VLOOKUPreturning#N/A) export their error code instead of an empty cell. - Many crashes and hangs on malformed workbooks are fixed, but some malformed files that used to load may now be rejected.
The MCP server and Claude Cowork plugin auto-convert Excel inputs via this command — see MCP Server.
See also: /docs/help/excel.md, to xlsx — the inverse (CSV → Excel), sniff.
Tip
New to qsv from SPSS, SAS or Stata? Start with qsv for SAS / Stata / SPSS Users, which maps everyday tasks to qsv commands.
Convert SAS, Stata & SPSS binary files to CSV.
Decades of public-sector and academic data — health surveys, labor statistics, longitudinal panels, replication archives — are published only in the proprietary formats of the big statistical packages. readstat opens them with no SAS/Stata/SPSS licence required, and without the ReadStat C library or pyreadstat: it is powered by polars-readstat-rs, which is pure Rust.
Warning
EXPERIMENTAL. The readers this command is built on are young. Spot-check the output against your source files before relying on a conversion, and please report anything that looks wrong.
| Package | Extensions | Memory |
|---|---|---|
| SAS | .sas7bdat |
streams — constant memory |
| SAS transport |
.xpt, .xpt5, .xpt8
|
streams — constant memory |
| Stata | .dta |
streams — constant memory |
| SPSS |
.sav, .zsav
|
streams — constant memory |
| SPSS portable | .por |
🤯 read whole — see the warning below |
The format is picked from the file extension, so stdin is not supported — readstat needs a real path. Piping out of it works normally. Passing a .sas7bcat (a SAS format catalog, not a dataset) errors with a pointer to the .sas7bdat file instead.
| Flag | Type | Description | Default |
|---|---|---|---|
--metadata <fmt> |
string | Dump variable metadata instead of the data. Valid values: none, csv, json, pretty-json. |
none |
--value-labels |
flag | Decode coded values to their label strings (e.g. 1 becomes "Male") instead of writing the underlying codes. For SAS .sas7bdat files, the labels come from the format catalog named by --sas7bcat, else <name>.sas7bcat or formats.sas7bcat beside the data file. Not supported for .xpt. |
|
--sas7bcat <file> |
string | Names the SAS format catalog holding a .sas7bdat file's value labels, for --value-labels, --sentinels-as label or --metadata. On its own it is refused for the data. |
|
--dictionary <file> |
string | Also write a JSON Schema data dictionary of the CSV, built from the file's own metadata — see below. | |
--compress-numeric |
flag | Write float variables that only ever hold whole numbers as integers (3.0 becomes 3). Decided per variable over the rows written, so the file is read twice. |
|
--sentinels-as <mode> |
string | Keep user-defined missing values ("sentinels") instead of writing empty cells: value (the code, e.g. .A or 99), label (its value label), or none (empty cells, and skip the dropped-sentinel check). Each eligible variable gets a <name>_null column. |
|
--sentinels-embedded |
flag | Write each sentinel into its variable's own column instead of a <name>_null column. Requires --sentinels-as. |
|
--sentinels-columns <list> |
string | Only keep sentinels for these variables. Requires --sentinels-as. |
|
--select <cols> |
string | Read only these variables, in this order, using qsv's select syntax (names, indices, q1-q20, /regex/, ! to exclude). Skipped variables are never decoded. Also narrows --metadata. |
|
--offset <n> / --limit <n>
|
integer | Read a window of rows. Stata, uncompressed SPSS & SAS transport files jump straight to the offset. |
0 / |
--sample <n> / --seed <n>
|
integer | Write a random sample of n rows from that window, in file order; --seed makes it reproducible. |
|
-j, --jobs <arg> |
integer | Number of reader threads. Raising it speeds up large uncompressed files at the cost of memory, as out-of-order chunks have to be buffered to keep the rows in source order. Row order is preserved either way. | 1 |
-b, --batch <size> |
integer | Number of rows to read into memory at a time. Does not apply to SPSS portable (.por) files — they have no chunked reader upstream, so they are read whole & memory scales with the file. Nor to SPSS .sav/.zsav files while their sentinels are tracked (see below), which also reads them whole. |
50000 |
-o, --output <file> |
string | Write output to <file> instead of stdout. |
|
-d, --delimiter <arg> |
string | The delimiter to use when writing CSV data. Must be a single character. | , |
Example: convert a SAS dataset, then profile it
qsv readstat nhanes.sas7bdat --output nhanes.csv
qsv stats nhanes.csv | qsv tableExample: a coded SPSS survey — codes by default, labels on request
# default: the underlying codes survive, so `frequency`/`stats` see real numbers
qsv readstat survey.sav | qsv frequency --select sex
# --value-labels decodes them to "Male"/"Female" instead (Stata, SPSS & SAS)
qsv readstat --value-labels survey.sav --output survey_labelled.csvExample: dump the variable dictionary as a browsable table
qsv readstat --metadata csv panel.dta | qsv tableExample: straight into a pipeline, no temp file
qsv readstat data.sas7bdat | qsv stats --everythingExample: peek at part of a large file
qsv readstat --select id,age,income --limit 1000 survey.sav
qsv readstat --sample 500 --seed 42 data.sas7bdatThese formats store a coded value (1) alongside a value label ("Male") held in a separate dictionary. readstat writes the code, not the label. That is deliberate, and lossless:
-
stats,schema,frequencyanddescribegptthen see the numbers the file actually stores, so type inference is correct and the coding survives a round trip. - The labels are not lost —
--metadatadumps the full value-label map for every variable.
Pass --value-labels when you want the human-readable strings instead.
For SAS (#4626), --value-labels on a .sas7bdat file uses its format catalog: <name>.sas7bcat, then formats.sas7bcat, beside the data file. --sas7bcat <file> names one explicitly. If no catalog is found, the command fails with a hint instead of silently writing codes. --metadata then includes each labeled SAS variable's value_labels. --sentinels-as label uses the same catalog to label only the sentinels .A-.Z & ._, leaving the values as codes unless --value-labels is also given. --metadata lists sentinel labels as MISSING_A, etc.
qsv readstat --sas7bcat formats.sas7bcat survey.sas7bdat --output survey_labelled.csvNote
Numeric variables arrive as floats. These formats store every numeric as a double, so an integer-looking column converts with a decimal point — a YEAR of 1948 becomes 1948.0, and a coded sex of 1 becomes 1.0. QSV_POLARS_FLOAT_PRECISION controls how many decimal places are written (see Environment Variables).
--compress-numeric writes such variables as integers (1948, 1) when every value in them is a whole number (#4661).
--metadata csv|json|pretty-json dumps what these files carry about their variables — variable labels, value labels, missing-value codes, measure & display settings, file encoding — instead of the data itself.
# machine-readable, for a documentation pipeline
qsv readstat --metadata pretty-json panel.dta > panel_dictionary.jsonNote
In the JSON forms the per-variable array is named columns for SAS and variables for Stata/SPSS, and the keys inside it differ by family too. The csv form flattens whichever shape it finds, deriving its columns from the data, so you do not have to branch on the source package.
--dictionary <file> writes, alongside the CSV, a draft 2020-12 JSON Schema data dictionary in the same shape describegpt --dictionary writes — but built from the file's own metadata, with no LLM involved (#4728). Name it <stem>.schema.json after the CSV and viz smart finds it on its own.
qsv readstat --dictionary survey.schema.json survey.sav -o survey.csv
qsv validate survey.csv survey.schema.json # validate against it
qsv viz smart survey.csv # picks up survey.schema.json- Variable labels become each column's
title; value labels go underx-qsv.value_labels; SPSS declared missing values underx-qsv.missing_values; SPSS measure becomesx-qsv.role(measure/dimension). -
enumis added only when the labels cover every value written, sovalidatenever rejects the data the dictionary describes. - It describes the CSV as written —
--value-labels,--compress-numeric,--select/--limit/--sampleall shape it — and records the options used underx-qsv.readstat_flags, which is what letswritestatundo them.
Warning
SPSS portable (.por) files are read whole. There is no chunked reader for .por upstream, so --batch does not bound its memory — peak usage scales with the file size. This is the only reason the command is marked 🤯; every other supported format streams with constant memory. For a large .por, convert on a machine with headroom (or ask the publisher for a .sav).
SPSS .sav/.zsav files are also read whole while their user-defined missing values are tracked: with --sentinels-as value|label, or by the default sentinel check below when a variable declares missing values. Pass --sentinels-as none to stream them.
--jobs trades memory, not order. Row order is preserved at any --jobs setting. Above one thread the readers take a chunk-interleaving path, and out-of-order chunks are buffered back into source order — which costs memory, not correctness. The default of 1 therefore keeps memory flat; raise it to speed up large uncompressed files.
Note
Stata extended missing values (.a through .z) come out as empty cells in every storage type, like ordinary missing values (#4627). To keep them, use --sentinels-as value|label, which also works for SAS and SPSS user-defined missing values (#4625).
Dropped sentinels are reported (#4708). Without --sentinels-as, readstat still writes them as empty cells, but warns at the end how many it dropped, in which variables, with an example:
5 sentinels (user-defined missing values) in 3 variables (income, rating, name) were written as empty cells, e.g. 99 in income. Use --sentinels-as value to keep them, or --sentinels-as none to skip this check.
The CSV output is the same either way. --sentinels-as none skips the check. It is also skipped at --jobs above 1, because tracking sentinels reads the file on a single thread. For SPSS files that declare missing values, the check costs about +76% time and reads the file whole (see above).
Note
readstat is a standalone conversion command (#4542 remains open). SAS/Stata/SPSS files are not yet transparently readable as input by other qsv commands the way .zip / .gz / Parquet inputs are — qsv stats data.sas7bdat will not work. Convert to CSV first. To carry the variable metadata along, use --dictionary, which validate, viz smart and writestat read.
readstat rides on the polars feature (✨🤯🐻❄️🚀) — it is in qsv, qsvpy* and qsvmcp, but not in qsvlite or qsvdp, and like viz it is absent from the big-endian targets (s390x, ppc64 BE). See Binary Variants.
See also: /docs/help/readstat.md, excel — the spreadsheet equivalent, stats, describegpt, MCP Server — exposed to LLM clients as the qsv_readstat tool, Recipe: Round-Trip SAS / Stata / SPSS.
The inverse of readstat: write a CSV as an SPSS (.sav, .por), Stata (.dta) or SAS transport (.xpt) file (#4728).
Warning
EXPERIMENTAL. Check the files it writes in the package that will read them before relying on them.
The format comes from the --output extension, or --format sav|por|dta|xpt|xpt5|xpt8 (.xpt is transport v8 by default). --compress writes a bytecode-compressed .sav. Compressed .zsav files and .sas7bdat datasets can't be written. --output is required; the CSV can come from stdin.
The round trip. Hand writestat the dictionary readstat --dictionary wrote, and the file comes back with its metadata: variable labels, value labels, SPSS missing values (discrete, range and string), measures, alignments, display widths & formats, the file label and SAS dataset name — each where the output format can hold it. What readstat did to write the CSV is undone: values decoded by --value-labels go back to their codes, and --sentinels-as sentinels become declared missing values again. Round trips are identical for every SPSS .sav fixture and for the SAS fixtures written as transport v5 and v8.
# SPSS → CSV (+ dictionary) → back to SPSS, metadata intact
qsv readstat --dictionary survey.schema.json survey.sav -o survey.csv
qsv writestat --dictionary survey.schema.json survey.csv -o survey2.sav
# the same data as a Stata file
qsv writestat --dictionary survey.schema.json survey.csv -o survey.dta
# no dictionary: column types are inferred from the CSV
qsv writestat data.csv -o data.xptA dictionary from describegpt --dictionary works too — its titles become variable labels.
For a worked, verified example — edit the CSV in between, prove the metadata survived, and see what --lossy drops going to Stata — see Recipe: Round-Trip SAS / Stata / SPSS.
Refuses rather than silently dropping. Metadata the output format can't hold — value labels & missing values in SAS transport and SPSS portable files, missing values & file labels in Stata, labels too long for SAS transport, column names Stata would rename, Stata tagged missing values — is an error. So are numbers a format would lose: in a SAS transport (.xpt) file, numbers beyond ±7.2e75 and (30.0.0: dathere/qsv#5103) non-zero numbers closer to 0 than ±5.4e-79 (16^-65, the smallest IBM float), which it would write as missing (or, below ±2.2e-308, as 0). (30.0.0: dathere/qsv#5103.) SPSS portable (.por) files have no such floor: they keep numbers this small, even below ±2.2e-308. --lossy writes the file anyway and warns about each thing left out; for numbers, the warning names the column and an example value. Names a format can't hold at all (too long, or not valid SPSS variable names in .sav/.por) are always an error; fix them first with rename or safenames.
| Flag | Description |
|---|---|
--dictionary <file> |
JSON Schema data dictionary giving the variable metadata & types |
--format <fmt> |
sav, por, dta, xpt, xpt5, xpt8 — when not implied by --output
|
--lossy |
Write even if metadata has to be left out, warning about each |
--compress |
Bytecode-compress an SPSS .sav
|
--table-name <name> |
Dataset name in a SAS transport file |
writestat is gated with readstat (✨🤯🐻❄️) — the same binaries carry it. See /docs/help/writestat.md.
CSV → other formats. Subcommands: parquet, xlsx, ods, sqlite, postgres, datapackage. Each can take multiple input CSVs (or a directory, or a .infile-list).
Example: convert NYC 311 to Parquet with zstd compression
qsv to parquet --infer-len 0 output_dir/ NYC_311_SR_2010-2020-sample-1M.csv
ls output_dir/
# NYC_311_SR_2010-2020-sample-1M.parquetThe parquet subcommand needs the polars feature. Default compression is zstd; override with --compression {zstd,gzip,snappy,lz4raw,uncompressed} and --compress-level N.
Column types are inferred from the first 1,000 rows by default (or taken from a current <file>.pschema.json, e.g. from qsv schema --polars). If a later value doesn't fit an inferred type, the whole conversion fails — on this file, a ZIP+4 such as 48090-2123 deep in the Incident Zip column, which the first rows make look like integers. --infer-len 0 scans every row before choosing types; a larger --infer-len N is the cheaper middle ground. to parquet also refuses to overwrite an existing .parquet file in the output directory — delete it first when re-running.
Note
--all-strings writes every column as text by reading it as text from the start, so type inference can't fail and leading zeros (00501) are kept; --infer-len, any .pschema.json and --try-parse-dates are not used with it (#4807).
Example: load wcp.csv into a fresh PostgreSQL database
qsv to postgres 'postgresql://user:pass@host/db' wcp.csv
# Creates a table named "wcp"Example: load multiple related CSVs into a single SQLite database
qsv to sqlite analytics.db nyc311.csv weather.csv stations.csv
# Tables: nyc311, weather, stationsExample: Excel workbook with one sheet per CSV
qsv to xlsx report.xlsx q1.csv q2.csv q3.csv q4.csv
# Sheet names match file stemsExample: Frictionless Data Package — CSV + JSON metadata
qsv to datapackage datapackage.json wcp.csv country_continent.csvExample: include stats in the Data Package
qsv to datapackage --stats datapackage.json wcp.csv--stats runs qsv stats against each CSV and embeds the result in the Data Package descriptor.
See also: /docs/help/to.md, sqlp — read Parquet inline with read_parquet, schema --polars, Integrations: DuckDB.
JSON array → CSV. The input must be a flat array (or single object) — no nested arrays/objects without a --jaq flatten step.
Example: simple JSON array of fruit records
[
{"fruit":"apple","price":2.50,"calories":95},
{"fruit":"banana","price":1.00,"calories":105}
]qsv json fruits.json > fruits.csvExample: extract a nested array with jaq
# response.json has structure: { "data": { "items": [ {...}, {...} ] } }
qsv json --jaq '.data.items' response.json > items.csvSee also: /docs/help/json.md, jsonl, tojsonl, jaq syntax.
JSONL / NDJSON → CSV. The first JSON line determines the headers; subsequent lines must be consistent.
Example: GitHub events stream
qsv jsonl events.jsonl > events.csvExample: pipe an API response through jaq, then jsonl
curl -s 'https://api.github.com/events' \
| jaq -c '.[]' \
| qsv jsonl > events.csvSee also: /docs/help/jsonl.md, fetch — fetch writes JSONL by default.
CSV → JSONL with smart type inference. Runs stats first to determine the right JSON type (string, number, boolean, null) for each column. Reuses an existing stats cache.
Booleans are inferred when cardinality = 2 and values match t/f, 1/0, y/n, or <value>/null patterns.
The two-value check is case- and whitespace-insensitive, so
True/False/false/TRUEis a boolean column, and a padded value likeTrueconverts totrueeven without--trim(#4830).
Example: convert wcp.csv to JSONL with typed values
qsv tojsonl wcp.csv > wcp.jsonl
head -1 wcp.jsonl
# {"Country":"ad","City":"aixas","AccentCity":"Aixàs","Region":"06","Population":null,"Latitude":42.4833333,"Longitude":1.4666667}Note Population is null (not "") and the coordinates are numbers (not strings).
Example: pre-populate the stats cache, then convert (skips the type-inference scan)
qsv stats --cardinality --infer-dates --stats-jsonl wcp.csv
qsv tojsonl wcp.csv > wcp.jsonlSee also: /docs/help/tojsonl.md, jsonl, stats, Stats Cache & Caching.
Streaming Snappy compression / decompression. Four subcommands: compress, decompress, check (first 50 bytes), validate (whole file).
Most qsv commands already handle .sz files transparently — the snappy command is the explicit interface when you need:
- Multithreaded compression (5–6× faster than the auto-compression)
- Compression of non-CSV files (it's format-agnostic)
- Integrity check / validation of an existing
.sz
Example: compress a 15 GB NYC 311 export (multithreaded)
qsv snappy compress nyc311-full.csv > nyc311-full.csv.szExample: decompress to stdin for inline pipelines
qsv snappy decompress nyc311-full.csv.sz | qsv slice --len 100 | qsv tableExample: validate a .sz file is well-formed
qsv snappy validate suspicious.csv.sz && echo "OK" || echo "Corrupt"Example: implicit compression via output filename
qsv slice --len 1000 wcp.csv --output sample.csv.sz
# qsv compresses on write (single-threaded). Use `qsv snappy compress` for multithreaded.See also: /docs/help/snappy.md, Performance Tuning — when streaming compression pays off, Indexing, Compression & Diff.
qsv inspects each input and, when it recognizes a non-CSV "special format," converts it to delimited text before the command runs.
Transparent auto-decompression. Compressed inputs just work — no manual unpack step:
-
Local
.zipinputs (and lookup tables) — the first tabular entry is extracted automatically. -
Compressed remote sources (
.gz/.zlib/.zst) for lookup tables andget/dc:ingests — streamed and decompressed on the fly. -
.sz(Snappy) is auto-handled by most commands.
Zip selection is consistent. The command-level "extract all entries" path (cat, sqlp, to, validate, scoresql) and the reader-level "first tabular entry" path (every other command) share one zip module with a single rule: entries are returned tabular-first (CSV/TSV/TAB/SSV before other supported formats), so a single-input command and a Config-only command (stats, count, …) pick the same entry from a mixed multi-entry zip. A zip with no supported entry errors clearly.
Conversion failures are errors. When a detected special-format input — Avro, Parquet, Arrow IPC, JSON, JSONL, or a gzip/zlib/zstd/snappy-compressed CSV/TSV/SSV — fails to convert, qsv reports it and exits non-zero, as it does for .zip, rather than reading the original (often binary) bytes as delimited text.
JSONL keys that appear late become columns. A JSONL/NDJSON input's columns are inferred from the whole file, so a key that first appears deep in the file (e.g. on row 150) becomes a column, empty in the rows without it. In 29.0.0 only the first 100 rows were used, and such a key was silently dropped. A current <file>.pschema.json still decides the columns; keys it doesn't list are ignored. (30.0.0: dathere/qsv#5125.) Object and array values are written as their JSON text ({"k": 1}, ["a", "b"]), so files with nested values convert instead of failing with "CSV format does not support nested data". (30.0.0: dathere/qsv#5127.)
sqlp and joinp refuse JSONL inputs. They read their positional inputs with Polars' CSV reader rather than through this conversion, so a .jsonl/.ndjson input (also .jsonl.sz) is an error. For sqlp, query the file with read_ndjson() and SKIP_INPUT. For joinp, convert it with jsonl first. In 29.0.0 the file was read as CSV without a warning, so the first JSON line became the header. (30.0.0: dathere/qsv#5128.)
If you genuinely want to read the raw bytes as delimited text, opt in explicitly with the QSV_SKIP_FORMAT_CHECK environment variable (see Environment Variables).
See also: Indexing, Compression & Diff → Transparent input decompression.
Convert between CSV (or SVG) and various spatial formats — GeoJSON, SHP, KML, GPX, and more. Pairs nicely with geocode.
Example: GeoJSON → CSV
qsv geoconvert nta_boundaries.geojson geojson csv > nta.csvExample: CSV with WKT geometry → GeoJSON for QGIS
qsv geoconvert parcels.csv csv geojson --geometry geometry > parcels.geojsonExample: stdin input via prompt
qsv prompt -m 'Choose a GeoJSON file' -F geojson | qsv geoconvert - geojson csvSee also: /docs/help/geoconvert.md, Geospatial, geocode.
OS-native file dialog (input or output). Useful for ad-hoc analyses where you don't want to copy-paste paths.
Example: pick a file, summarize it, view results
qsv prompt | qsv stats | qsv lensExample: pick a spreadsheet → CSV → save dialog for the result
qsv prompt -m 'Select a spreadsheet' -F xlsx,xls,ods \
| qsv excel - \
| qsv prompt -m 'Save exported CSV to...' --fd-outputprompt is part of the UI feature group (✨🐻❄️🖥️) — not available in qsvlite / qsvdp / qsvmcp.
See also: /docs/help/prompt.md, clipboard, lens.
See Selection & Inspection → clipboard. TL;DR:
# Read from clipboard
qsv clipboard | qsv stats | qsv table
# Write to clipboard
qsv stats wcp.csv | qsv table | qsv clipboard --save- Command Reference (index)
- Selection & Inspection → clipboard
-
Geospatial —
geocodecompanion togeoconvert -
Binary Variants — which builds include
readstat/writestat -
SQL & Polars —
sqlpreads Parquet / Arrow / JSONL inline -
Stats Cache & Caching —
tojsonlbenefits from the cache -
Integrations — using
to postgreswith DataPusher+, DuckDB workflows - Cookbook → Build a Data Pipeline
qsv — GitHub · Releases · Discussions · crates.io · qsv pro · Try it online · Benchmarks · DeepWiki · DOI · Licensed MIT · Third-party notices · AI Policy
qsv was made possible by datHere: standards-based, best-of-breed, open source solutions to make your Data Useful, Usable & Used.
Edit this page: Contributing to the Wiki
Home · Why qsv? · Tier legend
- Whirlwind Tour · Notebooks · Lessons & Exercises
- Benchmarks · Interactive Benchmarks
- Visualizations Gallery
- Neuro-symbolic, Localizable, Data Schematics
- Feature Flags · Goals/Non-goals · Testing
- Talks: NYC SOD 2022 · csv,conf,v8 · PyCon US 2025 · csv,conf,v9 · NYC SOD 2026
- "Have we achieved ACI?" series: 1 · 2 · 3 · 4
- Sponsor
- All Commands (index)
- Selection & Inspection
- Transform & Reshape
- Aggregation & Statistics
- Joins & Set Ops
- SQL & Polars
- Validation & Schema
- Metadata Profiling (profile)
- Conversion & I/O
- Geospatial
- Visualization (viz)
- HTTP & Web
- Get & Disk Cache
- Scripting (Luau / Python)
- Indexing, Compression & Diff
- AI & Documentation
- Recipes index
- Inspect an Unknown CSV
- Clean & Normalize
- Geographic Enrichment
- Date Enrichment
- CKAN Integration
- DCAT-US v3 for data.gov
- JSON Schema Validation
- Round-Trip SAS / Stata / SPSS
- Build a Data Pipeline
- Stats → Insights
- Data-Quality Signals with moarstats
- Group By
- Time Buckets
- Fetch & Cache
- Larger-than-RAM CSV
- Diff & Audit
- Multi-table Joins
- Synthesize Fake Data
- Performance Tuning
- Benchmarks
- Tuned csv Fork Benchmarks
- Security & Dependency Audits
- Environment Variables
- Stats Cache & Caching
- Lookup Tables
- MiniJinja Templating