---
title: "map(_:)"
framework: createml
role: symbol
role_heading: Instance Method
path: "createml/mldatacolumn/map(_:)"
---

# map(_:)

Creates a new column by applying the given thread-safe transform to every non-missing element of this column.

## Declaration

```swift
func map<T>(_ lazyTransform: @escaping (Element) -> T) -> MLDataColumn<T> where T : MLDataValueConvertible
```

## Parameters

- `lazyTransform`: A thread-safe element transformation function. The implementation of the transform you provide should accept an Element of the column and return a transformed value of a type that conforms to doc://com.apple.createml/documentation/CreateML/MLDataValueConvertible.

## Return Value

Return Value A new column typed to the return type of lazyTransform.

## See Also

### Transforming elements to generate a column

- [mapMissing(_:)](createml/mldatacolumn/mapmissing(_:).md)
