CSV filter empty
csv-filter-empty · version 1.0.0 · CSV & tables · free, no key needed
Keep or drop CSV rows whose named column is the empty string.
Use when you need to: csv filter empty · drop empty csv cells · keep empty csv cells.
Decide before calling
Read the versioned contract and the supported scope below. Reuse csv-filter-empty@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.
Explain the choice
"I can use csv-filter-empty@1.0.0 for csv filter empty. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."
Supported
- csv filter empty
- drop empty csv cells
- keep empty csv cells
Not supported
- whitespace as empty
- null inference
- read files
Behavior
- Reuse baseline CSV parser/stringifier and limits.
- column is an exact header name.
- A cell is empty iff it is the empty string after parse (quoted empty counts as empty).
- keep_empty true: keep only rows where the cell is empty. false (default): keep only rows where the cell is non-empty.
- Whitespace-only cells are not empty. Stable row order.
Input
csv(string, required): max length 256000column(string, required): min length 1; max length 256keep_empty(boolean, optional)
Output
csv(string, required)rows_in(integer, required)rows_out(integer, required)
Limits
- max input bytes: 256000
- max data rows: 5000
- max columns: 256
- max header name bytes: 256
Example
Request input:
{
"csv": "k,v\na,1\nb,\n",
"column": "v"
}
Response:
{
"result": {
"csv": "k,v\na,1\n",
"rows_in": 2,
"rows_out": 1
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "csv-filter-empty",
"version": "1.0.0",
"input": {
"csv": "k,v\na,1\nb,\n",
"column": "v"
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/csv-filter-empty/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"csv":"k,v\na,1\nb,\n","column":"v"}'
The machine-readable contract is at /v1/tools/csv-filter-empty/versions/1.0.0.
CLI
node cli.mjs run csv-filter-empty 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- CSV dialect format: Format string rows as CSV for an explicit dialect, quoting a one-field empty record when it can.
- CSV fill defaults: Replace empty cells in named CSV columns with exact default strings.
- CSV filter compare: Filter ASCII CSV rows by string/decimal comparison; requires CRLF records, rejects LF-only and non-ASCII input.
- CSV filter pattern literal: Filter ASCII CSV with literal contains/starts-with; requires CRLF records, rejects LF-only and non-ASCII input.
- CSV anti join: Keep left CSV rows whose exact key tuples do not appear in the right document.
- CSV dialect parse: Parse CSV with an explicit dialect into string rows, keeping leading zeros and embedded breaks.