---
title: "Descriptive statistics of a split's columns"
method: GET
path: "/statistics"
---

# Descriptive statistics of a split's columns

`GET /statistics`

Returns descriptive statistics, such as min, max, average, histogram, of the columns of a split.

## Query parameters

- `dataset` string, required
- `config` string, required
- `split` string, required

## Response `200`

The descriptive statistics for the columns of the split.

- StatisticsResponse
  - `statistics` StatisticsPerColumnItem[], required
    - `column_name` string, required
    - `column_type` 'float' | 'int' | 'class_label' | 'string_label' | 'string_text' | 'bool' | 'list' | 'audio' | 'image' | 'datetime', required
    - `column_statistics` union, required
      - NumericalStatisticsItem
        - `nan_count` integer, required
        - `nan_proportion` number, required
        - `min` number, nullable, required
        - `max` number, nullable, required
        - `mean` number, nullable, required
        - `median` number, nullable, required
        - `std` number, nullable, required
        - `histogram` Histogram, required
          - `hist` integer[], required
          - `bin_edges` number[], required
      - DatetimeStatisticsItem
        - `nan_count` integer, required
        - `nan_proportion` number, required
        - `min` string, nullable, required
        - `max` string, nullable, required
        - `mean` string, nullable, required
        - `median` string, nullable, required
        - `std` string, nullable, required
        - `histogram` DatetimeHistogram, required
          - `hist` integer[], required
          - `bin_edges` string[], required
      - CategoricalStatisticsItem — note that fields 'no_label_count' and 'no_label_proportion' are not required, because some old entries still miss them, and we don't want to recompute all of them. See https://github.com/huggingface/dataset-viewer/issues/2573.
        - `nan_count` integer, required
        - `nan_proportion` number, required
        - `no_label_count` integer
        - `no_label_proportion` number
        - `n_unique` integer, required
        - `frequencies` object, required
      - BoolStatisticsItem
        - `nan_count` integer, required
        - `nan_proportion` number, required
        - `frequencies` object, required
  - `num_examples` integer, required
  - `partial` boolean — True means that the response has been computed on part of the dataset (typically the first 5GB). False means that the complete dataset was used.

## Other responses

- `401` — If the external authentication step on the Hugging Face Hub failed, and no authentication mechanism has been provided. Retry with authentication.
- `404` — If the repository to download from cannot be found, or if the config or split does not exist in the dataset. Note that this may be because the dataset doesn't exist, or because it is set to `private` and you do not have access.
- `422` — Some of the 'dataset', 'config' or 'split' parameters have not been provided or are invalid.
- `500` — The server crashed, the response still hasn't been generated (the process is asynchronous), or the response couldn't be generated successfully due to an error in the dataset itself. The client can retry after a time, in particular in the case of the response still being processed. If the error does not vanish, it's possibly due to a bug in the API software or in the dataset, and should be reported.
- `501` — The server does not implement the feature.

---

[API](https://skmtc.net/huggingface/apis/dataset-viewer-server-api.md) · [All operations](https://skmtc.net/huggingface/apis/dataset-viewer-server-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/huggingface/dataset-viewer-server-api/versions/5048b8c0f4f9/schema)
