---
title: "sort(byIncreasingOrder:)"
framework: createml
role: symbol
role_heading: Instance Method
path: "createml/mldatacolumn/sort(byincreasingorder:)"
---

# sort(byIncreasingOrder:)

Returns a new MLDataColumn containing values sorted by the specified order.

## Declaration

```swift
func sort(byIncreasingOrder: Bool = true) -> MLDataColumn<Element>
```

## Parameters

- `byIncreasingOrder`: A boolean indicating whether to sort values in ascending or descending order. The default is true, sorted by ascending order.

## Return Value

Return Value A MLDataColumn sorted by the specified order.
