column(type:)
Clones the column to a data column of the given type.
Declaration
func column<T>(type: T.Type) -> MLDataColumn<T>? where T : MLDataValueConvertibleParameters
- type:
A metatype used to create a new data column of that type.
Return Value
A new data column if the underlying type of the column is the same as type; otherwise nil.
Discussion
Use this method to create a typed copy of the column. For example, to create a data column of integers from an untyped column of integers, use column(type:) with Int.self as the argument for the type parameter.