---
title: Data table derivation operations
framework: createml
role: collectionGroup
role_heading: API Collection
path: createml/data-table-derivation-operations
---

# Data table derivation operations

Create new data tables by manipulating an existing data table.

## Overview

Overview Use these methods to preprocess your data programmatically in Create ML before training a model. For example, you can create a data table by merging two data tables, fill in missing values, and then discarding duplicate rows. All of these methods create new data tables, leaving the original data table unmodified.

## Topics

### Aggregating rows

- [group(columnsNamed:aggregators:)](createml/mldatatable/group(columnsnamed:aggregators:).md)
- [MLDataTable.Aggregator](createml/mldatatable/aggregator.md)

### Sorting rows

- [sort(columnNamed:byIncreasingOrder:)](createml/mldatatable/sort(columnnamed:byincreasingorder:).md)

### Splitting a data table

- [randomSplit(by:seed:)](createml/mldatatable/randomsplit(by:seed:).md)

### Merging data tables

- [join(with:on:type:)](createml/mldatatable/join(with:on:type:).md)
- [MLDataTable.JoinType](createml/mldatatable/jointype.md)

### Filling in missing values

- [fillMissing(columnNamed:with:)](createml/mldatatable/fillmissing(columnnamed:with:).md)

### Masking rows

- [subscript(_:)](createml/mldatatable/subscript(_:)-3opgl.md)
- [subscript(_:)](createml/mldatatable/subscript(_:)-10r4l.md)

### Discarding rows

- [dropMissing()](createml/mldatatable/dropmissing().md)
- [dropDuplicates()](createml/mldatatable/dropduplicates().md)
- [exclude(_:of:)](createml/mldatatable/exclude(_:of:).md)
- [randomSample(by:seed:)](createml/mldatatable/randomsample(by:seed:).md)

### Selecting rows

- [subscript(_:)](createml/mldatatable/subscript(_:)-7h4j3.md)
- [subscript(_:)](createml/mldatatable/subscript(_:)-5le8a.md)
- [prefix(_:)](createml/mldatatable/prefix(_:).md)
- [suffix(_:)](createml/mldatatable/suffix(_:).md)
- [intersect(_:of:)](createml/mldatatable/intersect(_:of:).md)

### Selecting columns

- [subscript(_:)](createml/mldatatable/subscript(_:)-2wkan.md)

### Compacting rows

- [condense(columnNamed:to:)](createml/mldatatable/condense(columnnamed:to:).md)

### Expanding rows

- [expand(columnNamed:to:)](createml/mldatatable/expand(columnnamed:to:).md)

### Compacting columns

- [pack(columnsNamed:to:type:filling:)](createml/mldatatable/pack(columnsnamed:to:type:filling:).md)
- [MLDataTable.PackType](createml/mldatatable/packtype.md)

### Expanding columns

- [unpack(columnNamed:valueTypes:indexSubset:keySubset:)](createml/mldatatable/unpack(columnnamed:valuetypes:indexsubset:keysubset:).md)
