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.
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 fill defaults: Replace empty cells in named CSV columns with exact default strings.
- CSV anti join: Keep left CSV rows whose exact key tuples do not appear in the right document.
- CSV drop columns: Drop named CSV columns and keep the remaining columns in original header order.
- CSV filter equals: Keep CSV data rows whose named column equals an exact string.
- CSV replace exact: Replace CSV data cells whose entire value equals an exact find string.
- CSV abs integer column: Replace every data cell in a named CSV column with the absolute value of a canonical integer.