---
title: CategoricalSummary
framework: tabulardata
role: symbol
role_heading: Structure
path: tabulardata/categoricalsummary
---

# CategoricalSummary

A categorical summary of a collection’s elements.

## Declaration

```swift
struct CategoricalSummary<Element> where Element : Hashable
```

## Overview

Overview Each categorical summary has 5 statistics about a collection: someCount: The number of non-missing elements. noneCount The number of missing elements. uniqueCount: The number of unique elements. totalCount: The total number of elements. mode: An array of the most common values.

## Topics

### Creating a Summary

- [init()](tabulardata/categoricalsummary/init().md)
- [init(someCount:noneCount:uniqueCount:mode:)](tabulardata/categoricalsummary/init(somecount:nonecount:uniquecount:mode:).md)

### Inspecting a Summary

- [debugDescription](tabulardata/categoricalsummary/debugdescription.md)
- [mode](tabulardata/categoricalsummary/mode.md)
- [uniqueCount](tabulardata/categoricalsummary/uniquecount.md)
- [someCount](tabulardata/categoricalsummary/somecount.md)
- [noneCount](tabulardata/categoricalsummary/nonecount.md)
- [totalCount](tabulardata/categoricalsummary/totalcount.md)

## Relationships

### Conforms To

- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Statistical Summaries

- [NumericSummary](tabulardata/numericsummary.md)
- [AnyCategoricalSummary](tabulardata/anycategoricalsummary.md)
