<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "TabularData",
  "identifier" : "/documentation/TabularData/ColumnProtocol",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "TabularData"
    ],
    "preciseIdentifier" : "s:11TabularData14ColumnProtocolP"
  },
  "title" : "ColumnProtocol"
}
-->

# ColumnProtocol

A type that represents a column.

```
protocol ColumnProtocol<Element> : BidirectionalCollection
```

## Overview

`ColumnProtocol` defines the common functionality for typed column types.
Its type-erased counterpart is [`AnyColumnProtocol`](/documentation/TabularData/AnyColumnProtocol).

## Topics

### Inspecting a Column Type

[`var name: String`](/documentation/TabularData/ColumnProtocol/name)

The name of the column.

### Generating a Column by Adding Two Columns

[`static func + (Self, Self) -> Column<Self.Element>`](/documentation/TabularData/ColumnProtocol/+(_:_:)-yc11)

Generates a column by adding each element in a column type to the corresponding elements of another.

[`func + <L, R>(L, R) -> Column<L.Element>`](/documentation/TabularData/+(_:_:)-1i7oh)

Generates a column by adding each element in a column type to the corresponding elements of an optional column type.

[`func + <L, R>(L, R) -> Column<R.Element>`](/documentation/TabularData/+(_:_:)-3exmp)

Generates a column by adding each element in an optional column type to the corresponding elements of a column type.

### Generating a Column by Subtracting Two Columns

[`static func - (Self, Self) -> Column<Self.Element>`](/documentation/TabularData/ColumnProtocol/-(_:_:)-36zol)

Generates a column by subtracting each element in a column type from the corresponding elements of another.

[`func - <L, R>(L, R) -> Column<L.Element>`](/documentation/TabularData/-(_:_:)-25cs6)

Generates a column by subtracting each element in an optional column type
from the corresponding elements of a column type.

[`func - <L, R>(L, R) -> Column<R.Element>`](/documentation/TabularData/-(_:_:)-95yoe)

Generates a column by subtracting each element in a column type
from the corresponding elements of an optional column.

### Generating a Column by Multiplying Two Columns

[`static func * (Self, Self) -> Column<Self.Element>`](/documentation/TabularData/ColumnProtocol/*(_:_:)-9db1q)

Generates a column by multiplying each element in a column type by the corresponding elements of another.

[`func * <L, R>(L, R) -> Column<L.Element>`](/documentation/TabularData/*(_:_:)-l9r3)

Generates a column by multiplying each element in a column type
by the corresponding elements of an optional column type.

[`func * <L, R>(L, R) -> Column<R.Element>`](/documentation/TabularData/*(_:_:)-2toor)

Generates a column by multiplying each element in an optional column type
by the corresponding elements of a column type.

### Generating a Column by Dividing Two Columns

[`static func / (Self, Self) -> Column<Self.Element>`](/documentation/TabularData/ColumnProtocol/_(_:_:)-922ku)

Generates an integer column by dividing each element in a column type by the corresponding elements of another.

[`func / <L, R>(L, R) -> Column<L.Element>`](/documentation/TabularData/_(_:_:)-9v3nw)

Generates an integer column by dividing each element in a column type
by the corresponding elements of an optional column type.

[`func / <L, R>(L, R) -> Column<R.Element>`](/documentation/TabularData/_(_:_:)-4igyw)

Generates an integer column by dividing each element in an optional column type
by the corresponding elements of a column type.

[`static func / (Self, Self) -> Column<Self.Element>`](/documentation/TabularData/ColumnProtocol/_(_:_:)-2urf0)

Generates a floating-point column by dividing each element in a column type
by the corresponding elements of another.

[`func / <L, R>(L, R) -> Column<L.Element>`](/documentation/TabularData/_(_:_:)-4pr65)

Generates a floating-point column by dividing each element in a column type
by the corresponding elements of an optional column type.

[`func / <L, R>(L, R) -> Column<R.Element>`](/documentation/TabularData/_(_:_:)-58kg6)

Generates a floating-point column by dividing each element in an optional column type
by the corresponding elements of a column type.

### Generating a Column by Combining a Value

[`static func + (Self, Self.Element) -> Column<Self.Element>`](/documentation/TabularData/ColumnProtocol/+(_:_:)-39k8v)

Generates a column by adding a value to each element in a column.

[`static func + (Self.Element, Self) -> Column<Self.Element>`](/documentation/TabularData/ColumnProtocol/+(_:_:)-94kiv)

Generates a column by adding each element in a column to a value.

[`static func - (Self.Element, Self) -> Column<Self.Element>`](/documentation/TabularData/ColumnProtocol/-(_:_:)-4fynh)

Generates a column by subtracting each element in a column from a value.

[`static func - (Self, Self.Element) -> Column<Self.Element>`](/documentation/TabularData/ColumnProtocol/-(_:_:)-6up21)

Generates a column by subtracting a value from each element in a column.

[`static func * (Self, Self.Element) -> Column<Self.Element>`](/documentation/TabularData/ColumnProtocol/*(_:_:)-17vqd)

Generates a column by multiplying each element in a column by a value.

[`static func * (Self.Element, Self) -> Column<Self.Element>`](/documentation/TabularData/ColumnProtocol/*(_:_:)-3d6lu)

Generates a column by multiplying a value by each element in a column.

[`static func / (Self, Self.Element) -> Column<Self.Element>`](/documentation/TabularData/ColumnProtocol/_(_:_:)-4a632)

Generates an integer column by dividing each element in a column by a value.

[`static func / (Self.Element, Self) -> Column<Self.Element>`](/documentation/TabularData/ColumnProtocol/_(_:_:)-7pe3t)

Generates an integer column by dividing a value by each element in a column.

[`static func / (Self, Self.Element) -> Column<Self.Element>`](/documentation/TabularData/ColumnProtocol/_(_:_:)-6zigz)

Generates a floating-point column by dividing each element in a column by a value.

[`static func / (Self.Element, Self) -> Column<Self.Element>`](/documentation/TabularData/ColumnProtocol/_(_:_:)-4iv15)

Generates a floating-point column by dividing a value by each element in a column.

### Comparing a Column with a Value

[`static func == (Self, Self.Element) -> [Bool]`](/documentation/TabularData/ColumnProtocol/==(_:_:)-5jc0x)

Returns a Boolean array that indicates whether the corresponding element of a column type
is equal to a value.

[`static func == (Self.Element, Self) -> [Bool]`](/documentation/TabularData/ColumnProtocol/==(_:_:)-4hx04)

Returns a Boolean array that indicates whether the value
is equal to the corresponding element of a column type.

[`static func != (Self, Self.Element) -> [Bool]`](/documentation/TabularData/ColumnProtocol/!=(_:_:)-557vb)

Returns a Boolean array that indicates whether the corresponding element of a column type
isn’t equal to a value.

[`static func != (Self.Element, Self) -> [Bool]`](/documentation/TabularData/ColumnProtocol/!=(_:_:)-72ddh)

Returns a Boolean array that indicates whether the value
isn’t equal to the corresponding element of a column type.

### Operators

[`static func > (Self.Element, Self) -> [Bool]`](/documentation/TabularData/ColumnProtocol/_(_:_:)-68any)

Returns a Boolean array that indicates whether the value
is greater than the corresponding element of a column type.

[`static func < (Self.Element, Self) -> [Bool]`](/documentation/TabularData/ColumnProtocol/_(_:_:)-70vl1)

Returns a Boolean array that indicates whether the value
is less than the corresponding element of a column type.

[`static func < (Self, Self.Element) -> [Bool]`](/documentation/TabularData/ColumnProtocol/_(_:_:)-7gy2j)

Returns a Boolean array that indicates whether the corresponding element of a column type
is less than a value.

[`static func > (Self, Self.Element) -> [Bool]`](/documentation/TabularData/ColumnProtocol/_(_:_:)-9rct2)

Returns a Boolean array that indicates whether the corresponding element of a column type
is greater than a value.

[`static func <= (Self.Element, Self) -> [Bool]`](/documentation/TabularData/ColumnProtocol/_=(_:_:)-17m6l)

Returns a Boolean array that indicates whether the value
is less than or equal to the corresponding element of a column type.

[`static func >= (Self, Self.Element) -> [Bool]`](/documentation/TabularData/ColumnProtocol/_=(_:_:)-2w8gt)

Returns a Boolean array that indicates whether the corresponding element of a column type
is greater than or equal to a value.

[`static func >= (Self.Element, Self) -> [Bool]`](/documentation/TabularData/ColumnProtocol/_=(_:_:)-8jak4)

Returns a Boolean array that indicates whether the value
is greater than or equal to the corresponding element of a column type.

[`static func <= (Self, Self.Element) -> [Bool]`](/documentation/TabularData/ColumnProtocol/_=(_:_:)-9wr8s)

Returns a Boolean array that indicates whether the corresponding element of a column type
is less than or equal to a value.

## Relationships

### Conforming Types

[`ColumnSlice`](/documentation/TabularData/ColumnSlice)

[`DiscontiguousColumnSlice`](/documentation/TabularData/DiscontiguousColumnSlice)

[`Column`](/documentation/TabularData/Column)

[`FilledColumn`](/documentation/TabularData/FilledColumn)

### Inherits From

[`BidirectionalCollection`](/documentation/Swift/BidirectionalCollection)

[`Sequence`](/documentation/Swift/Sequence)

[`Collection`](/documentation/Swift/Collection)

### Inherited By

[`OptionalColumnProtocol`](/documentation/TabularData/OptionalColumnProtocol)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)