<!--
{
  "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/MLDataColumn/mapMissing(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Create ML",
      "CreateML"
    ],
    "preciseIdentifier" : "s:8CreateML12MLDataColumnV10mapMissingyACyqd__Gqd__SgxSgcAA0C16ValueConvertibleRd__lF"
  },
  "title" : "mapMissing(_:)"
}
-->

# mapMissing(_:)

Creates a new column, potentially with missing elements, by applying the given thread-safe transform to every
element of the column, including missing elements.

```
func mapMissing<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
[`MLDataValueConvertible`](/documentation/CreateML/MLDataValueConvertible). If the transform returns `nil` for a given element, the corresponding element
in the new column will have a missing value.

## Return Value

A new column.

---

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)