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.
Declaration
func mapMissing<T>(_ lazyTransform: @escaping (Element?) -> T?) -> MLDataColumn<T> where T : MLDataValueConvertibleParameters
- lazyTransform:
A thread-safe element transformation function. The implementation of the transform you provide should accept an
Elementof the column and return a transformed value of a type that conforms to Mldatavalueconvertible. If the transform returnsnilfor a given element, the corresponding element in the new column will have a missing value.
Return Value
A new column.