<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 10.14.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateML",
  "identifier" : "/documentation/CreateML/MLUntypedColumn/map(_:)-139qy",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Create ML",
      "CreateML"
    ],
    "preciseIdentifier" : "s:8CreateML15MLUntypedColumnV3mapyAA06MLDataD0VyxGxAA0F5ValueOcAA0fG11ConvertibleRzlF"
  },
  "title" : "map(_:)"
}
-->

# map(_:)

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

```
func map<T>(_ lazyTransform: @escaping (MLDataValue) -> 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
[`MLDataValueConvertible`](/documentation/CreateML/MLDataValueConvertible).

## Return Value

A new `MLDataColumn` typed to the return type of `lazyTransform`.

---

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)