Navigation
POST data

csv_stats

1 credit

Basic statistics per column (count, nulls, min, max, mean, unique)

Endpoint

POST /api/v1/tools/data/csv_stats

Body Parameters

text string required
header boolean optional default: true
delimiter string optional default: ","

Example

input Request
{
    "text": "name,age\nAlice,30\nBob,25\nAlice,"
}
output Response
{
    "columns": {
        "age": {
            "max": 30,
            "min": 25,
            "sum": 55,
            "mean": 27.5,
            "count": 3,
            "nulls": 1,
            "unique": 2,
            "numeric": true
        },
        "name": {
            "count": 3,
            "nulls": 0,
            "unique": 2,
            "numeric": false
        }
    },
    "row_count": 3
}

Response Format

HTTP/1.1 200 OK SUCCESS
{
  "success": true,
  "data": {
    "columns": {
        "age": {
            "max": 30,
            "min": 25,
            "sum": 55,
            "mean": 27.5,
            "count": 3,
            "nulls": 1,
            "unique": 2,
            "numeric": true
        },
        "name": {
            "count": 3,
            "nulls": 0,
            "unique": 2,
            "numeric": false
        }
    },
    "row_count": 3
},
  "meta": {
    "tool": "csv_stats",
    "credits_consumed": 1
  }
}
HTTP/1.1 422 Unprocessable Entity ERROR
{
  "success": false,
  "data": null,
  "error": {
    "code": "validation_error",
    "message": "The given data was invalid."
  }
}

Sign in to try this tool directly from the docs.

Code Examples
Request Example
lightbulb Developer Tip

Credits are deducted before execution. If the upstream tool fails, credits are automatically refunded to your account.