CSV select columns
csv-select-columns · version 1.0.0 · CSV & tables · free, no key needed
Select and reorder exact named columns from a complete CSV document.
Use when you need to: csv select columns · select csv columns · reorder csv columns.
Supported
- csv select columns
- select csv columns
- reorder csv columns
- project csv columns
Not supported
- rename columns
- match columns fuzzily
- infer types
- filter rows
- read files
- fetch urls
Behavior
- columns must name unique existing headers exactly and determine output order.
- Cell strings, data-row order, and quoted CSV content are preserved semantically.
- No trimming, type coercion, renaming, or fuzzy column matching is performed.
- Header-only input is supported; an empty document is rejected because it has no header.
- The first selected column name may not begin with U+FEFF because it is ambiguous with a CSV byte-order mark.
Input
csv(string, required): max length 256000columns(array of string, required): min items 1; max items 256; each min length 1
Output
- string
Limits
- max input bytes: 256000
- max data rows: 5000
- max columns: 256
- max header name bytes: 256
- max selected columns: 256
- max output bytes: 256000
Example
Request input:
{
"csv": "name,city,note\nAda,London,\"hello, world\"\n",
"columns": [
"note",
"name"
]
}
Response:
{
"result": "note,name\n\"hello, world\",Ada\n"
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "csv-select-columns",
"version": "1.0.0",
"input": {
"csv": "name,city,note\nAda,London,\"hello, world\"\n",
"columns": [
"note",
"name"
]
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/csv-select-columns/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"csv":"name,city,note\nAda,London,\"hello, world\"\n","columns":["note","name"]}'
The machine-readable contract is at /v1/tools/csv-select-columns/versions/1.0.0.
CLI
node cli.mjs run csv-select-columns 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- CSV dedupe: Remove duplicate CSV data rows while preserving the first occurrence.
- CSV drop columns: Drop named CSV columns and keep the remaining columns in original header order.
- CSV fill defaults: Replace empty cells in named CSV columns with exact default strings.
- CSV group count: Count CSV rows by exact named-column tuples in first-seen order.
- CSV merge columns: Join named CSV columns with an exact separator into one column.
- CSV rename columns: Rename CSV headers by an exact from/to mapping, preserving row cells and column order.