---
title: Column
framework: tabulardata
role: symbol
role_heading: Structure
path: tabulardata/column
---

# Column

A column in a data frame.

## Declaration

```swift
struct Column<WrappedElement>
```

## Overview

Overview A column is a Collection that contains values of a specific type, including: Int Double String Each element in a column is an Optional of the column’s type. Each nil element represents a missing value.

## Topics

### Creating a Column

- [init(name:capacity:)](tabulardata/column/init(name:capacity:).md)
- [init(_:capacity:)](tabulardata/column/init(_:capacity:).md)
- [init(name:contents:)](tabulardata/column/init(name:contents:)-6okx3.md)
- [init(name:contents:)](tabulardata/column/init(name:contents:)-8nxtj.md)
- [init(_:contents:)](tabulardata/column/init(_:contents:)-1871a.md)
- [init(_:contents:)](tabulardata/column/init(_:contents:)-7z5ji.md)
- [init(_:)](tabulardata/column/init(_:).md)

### Creating a Column of the Same Type

- [prototype](tabulardata/column/prototype.md)

### Creating a Type-Erased Column

- [eraseToAnyColumn()](tabulardata/column/erasetoanycolumn().md)

### Creating Transformed Columns

- [map(_:)](tabulardata/column/map(_:).md)
- [mapNonNil(_:)](tabulardata/column/mapnonnil(_:).md)

### Inspecting a Column

- [name](tabulardata/column/name.md)
- [count](tabulardata/column/count.md)
- [missingCount](tabulardata/column/missingcount.md)
- [Column.Element](tabulardata/column/element.md)
- [wrappedElementType](tabulardata/column/wrappedelementtype.md)

### Transforming a Column

- [transform(_:)](tabulardata/column/transform(_:)-271dd.md)
- [transform(_:)](tabulardata/column/transform(_:)-6mrwg.md)

### Adding Elements

- [append(_:)](tabulardata/column/append(_:)-qycj.md)
- [append(_:)](tabulardata/column/append(_:)-4t2pt.md)
- [append(contentsOf:)](tabulardata/column/append(contentsof:)-qb4p.md)
- [append(contentsOf:)](tabulardata/column/append(contentsof:)-42y1d.md)

### Finding an Element Index

- [argmin()](tabulardata/column/argmin().md)
- [argmax()](tabulardata/column/argmax().md)

### Removing an Element

- [remove(at:)](tabulardata/column/remove(at:).md)

### Accessing Elements

- [subscript(_:)](tabulardata/column/subscript(_:)-qm4d.md)
- [subscript(_:)](tabulardata/column/subscript(_:)-52xy1.md)
- [subscript(_:)](tabulardata/column/subscript(_:)-gne9.md)

### Creating a Slice of Unique Elements

- [distinct()](tabulardata/column/distinct().md)

### Creating a Slice by Masking Elements

- [subscript(_:)](tabulardata/column/subscript(_:)-56i2s.md)

### Encoding a Column

- [encoded(using:)](tabulardata/column/encoded(using:).md)

### Decoding a Column

- [decoded(_:using:)](tabulardata/column/decoded(_:using:).md)

### Summarizing a Column

- [summary()](tabulardata/column/summary().md)
- [numericSummary()](tabulardata/column/numericsummary()-2m0sr.md)
- [numericSummary()](tabulardata/column/numericsummary()-8laeo.md)

### Getting Statistical Values

- [sum()](tabulardata/column/sum().md)
- [min()](tabulardata/column/min().md)
- [max()](tabulardata/column/max().md)
- [mean()](tabulardata/column/mean()-2si7j.md)
- [mean()](tabulardata/column/mean()-ic5z.md)
- [standardDeviation(deltaDegreesOfFreedom:)](tabulardata/column/standarddeviation(deltadegreesoffreedom:)-9ffqu.md)
- [standardDeviation(deltaDegreesOfFreedom:)](tabulardata/column/standarddeviation(deltadegreesoffreedom:)-4kc16.md)

### Describing a Column

- [description](tabulardata/column/description.md)
- [debugDescription](tabulardata/column/debugdescription.md)
- [customMirror](tabulardata/column/custommirror.md)

### Modifying a Column with a Value

- [+=(_:_:)](tabulardata/column/+=(_:_:)-94q8g.md)
- [-=(_:_:)](tabulardata/column/-=(_:_:)-8arlr.md)
- [*=(_:_:)](tabulardata/column/*=(_:_:)-4rraw.md)
- [/=(_:_:)](tabulardata/column/_=(_:_:)-8jmir.md)
- [/=(_:_:)](tabulardata/column/_=(_:_:)-3hfr5.md)

### Modifying a Column with a Collection of Values

- [+=(_:_:)](tabulardata/column/+=(_:_:)-2w5o4.md)
- [+=(_:_:)](tabulardata/column/+=(_:_:)-2scuy.md)
- [-=(_:_:)](tabulardata/column/-=(_:_:)-8rgjq.md)
- [-=(_:_:)](tabulardata/column/-=(_:_:)-3v0hh.md)
- [*=(_:_:)](tabulardata/column/*=(_:_:)-8mmnn.md)
- [*=(_:_:)](tabulardata/column/*=(_:_:)-6kp11.md)
- [/=(_:_:)](tabulardata/column/_=(_:_:)-dnma.md)
- [/=(_:_:)](tabulardata/column/_=(_:_:)-8xhzg.md)
- [/=(_:_:)](tabulardata/column/_=(_:_:)-86t1j.md)
- [/=(_:_:)](tabulardata/column/_=(_:_:)-3acz8.md)

### Instance Methods

- [withContiguousMutableStorageIfAvailable(_:)](tabulardata/column/withcontiguousmutablestorageifavailable(_:)-9j9p8.md)
- [withContiguousStorageIfAvailable(_:)](tabulardata/column/withcontiguousstorageifavailable(_:)-6nbz3.md)

### Default Implementations

- [BidirectionalCollection Implementations](tabulardata/column/bidirectionalcollection-implementations.md)
- [CustomDebugStringConvertible Implementations](tabulardata/column/customdebugstringconvertible-implementations.md)
- [CustomReflectable Implementations](tabulardata/column/customreflectable-implementations.md)
- [CustomStringConvertible Implementations](tabulardata/column/customstringconvertible-implementations.md)
- [MutableCollection Implementations](tabulardata/column/mutablecollection-implementations.md)
- [Sequence Implementations](tabulardata/column/sequence-implementations.md)

## Relationships

### Conforms To

- [BidirectionalCollection](swift/bidirectionalcollection.md)
- [Collection](swift/collection.md)
- [ColumnProtocol](tabulardata/columnprotocol.md)
- [Copyable](swift/copyable.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomReflectable](swift/customreflectable.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Decodable](swift/decodable.md)
- [Encodable](swift/encodable.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [Hashable](swift/hashable.md)
- [MutableCollection](swift/mutablecollection.md)
- [OptionalColumnProtocol](tabulardata/optionalcolumnprotocol.md)
- [RandomAccessCollection](swift/randomaccesscollection.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [Sequence](swift/sequence.md)

## See Also

### Typed Columns

- [ColumnSlice](tabulardata/columnslice.md)
- [FilledColumn](tabulardata/filledcolumn.md)
- [DiscontiguousColumnSlice](tabulardata/discontiguouscolumnslice.md)
- [ColumnProtocol](tabulardata/columnprotocol.md)
- [OptionalColumnProtocol](tabulardata/optionalcolumnprotocol.md)
