{
  "slug": "csv-group-by",
  "name": "gizza-ai/csv-group-by",
  "version": "0.1.0",
  "title": "CSV Group By — Aggregate Rows Online — gizza.ai",
  "description": "Group CSV rows by a column and aggregate others (count, sum, average, min, max) — in your browser. Free, private, no upload.",
  "tags": [
    "csv group by",
    "aggregate csv",
    "csv sum",
    "csv pivot",
    "group rows",
    "csv summary"
  ],
  "category": "data",
  "urls": {
    "page": "https://gizza.ai/tools/csv-group-by/",
    "markdown": "https://gizza.ai/tools/csv-group-by/index.md",
    "descriptor": "https://gizza.ai/tools/csv-group-by/tool.json",
    "deep_link_example": "https://gizza.ai/tools/csv-group-by/?data=dept%2Camount%0AA%2C10%0AB%2C5%0AA%2C20&group_by_cols=dept&aggregations=amount%3Asum%2C%20count&delimiter=%2C"
  },
  "cli": "gizza tool csv-group-by \"dept,amount\nA,10\nB,5\nA,20\" 'aggregations=amount:sum, count'",
  "tool": {
    "description": "Group CSV rows by one or more columns and aggregate other columns. `group_by` is comma-separated column names/indices; `aggregations` is a comma/semicolon list of 'column:func' (func = count/sum/avg/min/max) plus optional bare 'count' for the row count. Output has one row per group (first-seen order) with the group columns then the aggregated columns (named like 'sum_amount'). Requires a header row.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "aggregations": {
          "description": "Aggregations as a comma/semicolon list of 'column:func' (func = count/sum/avg/min/max), or bare 'count' for the per-group row count. E.g. 'amount:sum, qty:avg, count'.",
          "type": "string"
        },
        "data": {
          "description": "The CSV text (first row must be a header).",
          "type": "string"
        },
        "delimiter": {
          "default": ",",
          "description": "Field separator: a single char or 'comma'/'tab'/'semicolon'/'pipe'. Default ','.",
          "type": "string"
        },
        "group_by": {
          "description": "Column(s) to group by — comma-separated header names or 1-based indices.",
          "type": "string"
        }
      },
      "required": [
        "data",
        "group_by",
        "aggregations"
      ],
      "type": "object"
    }
  }
}