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()) throwsParameters
- data:
The contents of a CSV file in a Data instance.
- columns:
An array of column names; Set to
nilto use every column in the CSV file. - rows:
A range of indices; Set to
nilto 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.