Contents

unpack(columnNamed:valueTypes:indexSubset:keySubset:)

Creates a new data table with additional columns that contain the unpacked collections in the given column.

Declaration

func unpack(columnNamed: String, valueTypes: [MLDataValue.ValueType]? = nil, indexSubset: [Int]? = nil, keySubset: [String]? = nil) -> MLDataTable

Parameters

  • columnNamed:

    The name of the column to unpack. The underlying type of the column must be either Sequencetype or Dictionarytype.

  • valueTypes:

    An array of the underlying types for the new, unpacked columns. If nil, the method infers the underlying types in the sequence or dictionary.

  • indexSubset:

    The subset of indicies to unpack from a specified sequence-typed column. If nil, the method unpacks all indicies.

  • keySubset:

    The subset of keys to unpack from a specified dictionary-typed column. If nil, the method unpacks all keys.

Return Value

A new data table.

Discussion

This function performs the inverse of pack(columnsNamed:to:type:filling:).