CSV scale integer column
csv-scale-integer-column · version 1.0.0 · CSV & tables · free, no key needed
Multiply every data cell in a named CSV column by a canonical integer factor.
Use when you need to: csv scale integer column · multiply csv integer column · scale csv column by integer.
Supported
- csv scale integer column
- multiply csv integer column
- scale csv column by integer
Not supported
- floating point scale
- percentage scale
- infer numeric types
- locale grouping separators
- read files
- fetch urls
Behavior
- The first CSV record is the header row. Duplicate and empty header names are rejected.
- column names an existing header exactly; no trimming, case folding, or fuzzy matching.
- factor and every data cell in column are canonical integer strings parsed with BigInt. Empty cells are invalid. -0 is accepted and canonicalized to 0.
- Each output cell is the canonical integer string of the product of the input cell and factor.
- Each product may have at most 1000 digits excluding sign; overflow is invalid_input.
- An empty document without a header is rejected. A header-only document is returned unchanged.
- Other columns and row order are preserved. The first output header name may not begin with U+FEFF.
Input
csv(string, required): max length 256000column(string, required): min length 1; max length 256factor(string, required): min length 1; max length 1001
Output
csv(string, required)
Limits
- max input bytes: 256000
- max data rows: 5000
- max columns: 256
- max header name bytes: 256
- max integer digits: 1000
- max output bytes: 256000
Example
Request input:
{
"csv": "qty,name\n3,Ada\n-2,Lin\n0,Zoe\n",
"column": "qty",
"factor": "4"
}
Response:
{
"result": {
"csv": "qty,name\n12,Ada\n-8,Lin\n0,Zoe\n"
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "csv-scale-integer-column",
"version": "1.0.0",
"input": {
"csv": "qty,name\n3,Ada\n-2,Lin\n0,Zoe\n",
"column": "qty",
"factor": "4"
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/csv-scale-integer-column/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"csv":"qty,name\n3,Ada\n-2,Lin\n0,Zoe\n","column":"qty","factor":"4"}'
The machine-readable contract is at /v1/tools/csv-scale-integer-column/versions/1.0.0.
CLI
node cli.mjs run csv-scale-integer-column 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- CSV abs integer column: Replace every data cell in a named CSV column with the absolute value of a canonical integer.
- CSV clamp integer column: Clamp every data cell in a named CSV column to optional canonical integer min and max bounds.
- CSV filter equals: Keep CSV data rows whose named column equals an exact string.
- CSV split column: Split one CSV column on an exact separator into uniquely named columns.
- CSV sum integers: Sum a CSV column of strict signed base-10 integer strings using BigInt.
- CSV dedupe: Remove duplicate CSV data rows while preserving the first occurrence.