---
title: dropDuplicates()
framework: createml
role: symbol
role_heading: Instance Method
path: createml/mldatatable/dropduplicates()
---

# dropDuplicates()

Creates a subset of the table by removing all duplicate rows.

## Declaration

```swift
func dropDuplicates() -> MLDataTable
```

## Return Value

Return Value A new data table.

## Discussion

Discussion note: The order of the rows may not be preserved.

## See Also

### Discarding rows

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