> ## Documentation Index
> Fetch the complete documentation index at: https://docs.summand.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Column stats

> Per-column distributions, missingness, cardinality, and numeric summaries.

`column_stats` is the baseline component. It powers dataset summaries shown to Summand and the schema-level views the rest of the product builds on. It runs when you select it in an experiment or when Summand runs it from chat.

Separately, every ingest writes a lighter set of per-column statistics (row and null counts, minimums and maximums) read from the table's metadata. That set is available as soon as ingestion finishes, without running this component.

## What it computes

For every column in the dataset:

* **Common stats** — `name`, `dtype`, `count`, `nullCount`, `nullPct`, `uniqueCount`, `uniquePct`.
* **Numeric columns** — `min`, `max`, `mean`, `median`, `std`, first and third quartiles, `zeroCount`, `zeroPct`.
* **Categorical / string columns** — top 10 distinct values with counts.

Plus dataset-level totals: `totalRows`, `totalColumns`.

## Inputs

None. `column_stats` takes no configuration — it always runs on the full dataset.

## Output shape

```json theme={null}
{
  "totalRows": 50000,
  "totalColumns": 24,
  "columns": [
    {
      "name": "revenue",
      "dtype": "float64",
      "count": 49872,
      "nullCount": 128,
      "nullPct": 0.26,
      "uniqueCount": 12451,
      "uniquePct": 24.94,
      "min": 0.0,
      "max": 9842.5,
      "mean": 142.7,
      "median": 89.5,
      "std": 218.3,
      "q1": 32.0,
      "q3": 184.2,
      "zeroCount": 4,
      "zeroPct": 0.01
    },
    {
      "name": "tier",
      "dtype": "object",
      "count": 50000,
      "nullCount": 0,
      "nullPct": 0.0,
      "uniqueCount": 3,
      "uniquePct": 0.01,
      "topValues": [
        { "value": "free",    "count": 38240 },
        { "value": "pro",     "count":  9810 },
        { "value": "enterprise", "count": 1950 }
      ]
    }
  ]
}
```

The artifact is written as `column_stats.json` to the dataset's versioned S3 path.

## Where it shows up

* **Dataset detail → Components tab** shows the latest `column_stats` artifact column by column.
* **Summand chat** queries it via the `analyze` tool — *"What's the missingness of `revenue`?"* resolves to a filtered read of the artifact.

## Compute profile

| Profile | Memory | Timeout |
| - | - | - |
| Lambda | 2 GB | 120 s |

For most datasets this finishes in a few seconds. The component reads the curated Parquet, computes the stats in pandas, and writes the JSON.

## Filtering from chat

Summand can ask for a single column instead of the whole stats blob:

```text theme={null}
analyze({ component: "column_stats", target: ..., params: { column_name: "revenue" } })
```

The agent receives just that column's stats — efficient even on wide tables.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.