Contents

init(csvData:columns:rows:types:options:)

Creates a data frame from CSV data.

Declaration

init(csvData data: Data, columns: [String]? = nil, rows: Range<Int>? = nil, types: [String : CSVType] = [:], options: CSVReadingOptions = .init()) throws

Parameters

  • data:

    The contents of a CSV file in a Data instance.

  • columns:

    An array of column names; Set to nil to use every column in the CSV file.

  • rows:

    A range of indices; Set to nil to use every row in the CSV file.

  • types:

    A dictionary of column names and their CSV types. The data frame infers the types for column names that aren’t in the dictionary.

  • options:

    The options that tell the data frame how to read the CSV data.

Discussion

See Also

Creating a Data Frame from a CSV