CSV drop columns
csv-drop-columns · version 1.0.0 · CSV & tables · free, no key needed
Drop named CSV columns and keep the remaining columns in original header order.
Use when you need to: csv drop columns · drop csv columns · remove csv columns.
Supported
- csv drop columns
- drop csv columns
- remove csv columns
Not supported
- rename columns
- reorder remaining columns
- fuzzy header matching
- drop rows
- read files
- fetch urls
Behavior
- columns is a unique non-empty list of existing header names to remove.
- At least one header must remain; remaining columns stay in original header order.
- Cell strings of kept columns are preserved without trimming, case folding, or type coercion.
- An empty document without a header is rejected; a header-only document drops columns and keeps zero data rows.
- The first output header 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
csv(string, required)
Limits
- max input bytes: 256000
- max data rows: 5000
- max columns: 256
- max header name bytes: 256
- max dropped columns: 256
- max output bytes: 256000
Example
Request input:
{
"csv": "id,name,secret,note\n1,Ada,hidden,\"hello, world\"\n",
"columns": [
"secret"
]
}
Response:
{
"result": {
"csv": "id,name,note\n1,Ada,\"hello, world\"\n"
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "csv-drop-columns",
"version": "1.0.0",
"input": {
"csv": "id,name,secret,note\n1,Ada,hidden,\"hello, world\"\n",
"columns": [
"secret"
]
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/csv-drop-columns/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"csv":"id,name,secret,note\n1,Ada,hidden,\"hello, world\"\n","columns":["secret"]}'
The machine-readable contract is at /v1/tools/csv-drop-columns/versions/1.0.0.
CLI
node cli.mjs run csv-drop-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 fill defaults: Replace empty cells in named CSV columns with exact default strings.
- CSV filter empty: Keep or drop CSV rows whose named column is the empty string.
- 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.