@toolpal/csv-insights
publicv2.0published 1 download this weekMIT
Profiles a CSV file locally and exactly instead of eyeballing it: row count, each column's inferred type (number, date, boolean, text), missing and unique values, min/max/mean/median/sum/standard deviation for numeric columns, date ranges, and the most frequent values of text columns. Handles quoted fields and comma, semicolon, tab or pipe delimiters. Offline, no API key needed.
Profiles a CSV or TSV file locally with exact calculations — no API keys, no network access, and no row sampling guesses.
How it works
- Detects the delimiter (
,,;, tab, or|) from the header row unless you specify one. - Parses quoted RFC 4180 fields, counts data rows and ragged rows, and deduplicates header names.
- For each column, infers its type (
number,date,boolean,text, orempty), counts filled/missing/unique values, and computes:- Numeric columns: min, max, mean, median, sum, and standard deviation (handling currency prefixes, accounting negatives like
($42.50), percentages, and European decimal commas on;-delimited files). - Date columns: earliest and latest ISO dates.
- Text & boolean columns: the most frequent values and their counts.
- Numeric columns: min, max, mean, median, sum, and standard deviation (handling currency prefixes, accounting negatives like
Example
{
"file": "sales-q3.csv",
"topValues": 5
}Returns (illustrative):
{
"rows": 1420,
"columnCount": 4,
"delimiter": ",",
"raggedRows": 0,
"columns": [
{
"name": "revenue",
"type": "number",
"filled": 1418,
"missing": 2,
"unique": 891,
"stats": { "min": 12.5, "max": 9800, "mean": 412.35, "median": 250, "sum": 584712.3, "stdDev": 620.11 }
}
]
}Notes
- Runs 100% offline (
net: false, no environment variables required). - Maximum input file size: 25 MB.
- Empty cells as well as
NA,N/A,null,none,NaN, and-are counted as missing.
Input
Validated before the workflow runs.
- filerequiredfile
CSV, TSV or pipe/semicolon-delimited text file
- delimiter"," | ";" | "tab" | "|"
Field separator; detected from the header row when left out
- topValuesinteger
Frequent values to list per text column, 5 by default
≥ 1 · ≤ 20
| Field | Type | Description |
|---|---|---|
| filerequired | file | CSV, TSV or pipe/semicolon-delimited text file |
| delimiter | "," | ";" | "tab" | "|" | Field separator; detected from the header row when left out |
| topValues | integer | Frequent values to list per text column, 5 by default ≥ 1 · ≤ 20 |
JSON Schema
{
"type": "object",
"required": [
"file"
],
"properties": {
"file": {
"type": "string",
"description": "CSV, TSV or pipe/semicolon-delimited text file",
"x-toolpal-file": true
},
"delimiter": {
"anyOf": [
{
"type": "string",
"const": ","
},
{
"type": "string",
"const": ";"
},
{
"type": "string",
"const": "tab"
},
{
"type": "string",
"const": "|"
}
],
"description": "Field separator; detected from the header row when left out"
},
"topValues": {
"type": "integer",
"maximum": 20,
"minimum": 1,
"description": "Frequent values to list per text column, 5 by default"
}
}
}Output
Validated before your agent receives it.
- rowsrequiredinteger
Data rows, not counting the header
- columnsrequiredobject[]
- delimiterrequiredstring
- raggedRowsrequiredinteger
Rows whose field count differs from the header
- columnCountrequiredinteger
| Field | Type | Description |
|---|---|---|
| rowsrequired | integer | Data rows, not counting the header |
| columnsrequired | object[] | - |
| delimiterrequired | string | - |
| raggedRowsrequired | integer | Rows whose field count differs from the header |
| columnCountrequired | integer | - |
JSON Schema
{
"type": "object",
"required": [
"rows",
"columnCount",
"delimiter",
"raggedRows",
"columns"
],
"properties": {
"rows": {
"type": "integer",
"description": "Data rows, not counting the header"
},
"columns": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"type",
"filled",
"missing",
"unique"
],
"properties": {
"name": {
"type": "string"
},
"type": {
"anyOf": [
{
"type": "string",
"const": "number"
},
{
"type": "string",
"const": "date"
},
{
"type": "string",
"const": "boolean"
},
{
"type": "string",
"const": "text"
},
{
"type": "string",
"const": "empty"
}
]
},
"range": {
"type": "object",
"required": [
"earliest",
"latest"
],
"properties": {
"latest": {
"type": "string"
},
"earliest": {
"type": "string"
}
}
},
"stats": {
"type": "object",
"required": [
"min",
"max",
"mean",
"median",
"sum",
"stdDev"
],
"properties": {
"max": {
"type": "number"
},
"min": {
"type": "number"
},
"sum": {
"type": "number"
},
"mean": {
"type": "number"
},
"median": {
"type": "number"
},
"stdDev": {
"type": "number"
}
}
},
"filled": {
"type": "integer"
},
"unique": {
"type": "integer"
},
"missing": {
"type": "integer",
"description": "Empty cells and NA, N/A, null, none, NaN or -"
},
"topValues": {
"type": "array",
"items": {
"type": "object",
"required": [
"value",
"count"
],
"properties": {
"count": {
"type": "integer"
},
"value": {
"type": "string"
}
}
}
}
}
}
},
"delimiter": {
"type": "string"
},
"raggedRows": {
"type": "integer",
"description": "Rows whose field count differs from the header"
},
"columnCount": {
"type": "integer"
}
}
}