<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 10.14.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateML",
  "identifier" : "/documentation/CreateML/MLDataTable/ParsingOptions",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Create ML",
      "CreateML"
    ],
    "preciseIdentifier" : "s:8CreateML11MLDataTableV14ParsingOptionsV"
  },
  "title" : "MLDataTable.ParsingOptions"
}
-->

# MLDataTable.ParsingOptions

The options for parsing a comma-separated values (CSV) file into a data
table for a machine learning model.

```
struct ParsingOptions
```

## Overview

Use `ParsingOptions` only when importing a CSV file with
[`init(contentsOf:options:)`](/documentation/CreateML/MLDataTable/init(contentsOf:options:)), especially if your CSV file
has special formatting or your data table only needs to import specific
rows or columns.

## Topics

### Creating the CSV parsing options

[`init(containsHeader:delimiter:comment:escape:doubleQuote:quote:skipInitialSpaces:missingValues:lineTerminator:selectColumns:maxRows:skipRows:)`](/documentation/CreateML/MLDataTable/ParsingOptions/init(containsHeader:delimiter:comment:escape:doubleQuote:quote:skipInitialSpaces:missingValues:lineTerminator:selectColumns:maxRows:skipRows:))

Creates CSV parsing options.

### Specifying the CSV file format

[`containsHeader`](/documentation/CreateML/MLDataTable/ParsingOptions/containsHeader)

A Boolean value indicating whether an input CSV file contains a
header.

[`delimiter`](/documentation/CreateML/MLDataTable/ParsingOptions/delimiter)

The character that separates the data fields in a CSV file.

[`lineTerminator`](/documentation/CreateML/MLDataTable/ParsingOptions/lineTerminator)

The character that represents the end of a line in a CSV file.

### Handling special characters

[`escape`](/documentation/CreateML/MLDataTable/ParsingOptions/escape)

The character that marks a C escape sequence in a CSV file.

[`quote`](/documentation/CreateML/MLDataTable/ParsingOptions/quote)

The character that represents a quote (`"`) in a CSV file.

[`doubleQuote`](/documentation/CreateML/MLDataTable/ParsingOptions/doubleQuote)

A Boolean value indicating whether two consecutive quotes (`""`)
represent a single quote (`"`) in a CSV file.

### Ignoring CSV components

[`skipRows`](/documentation/CreateML/MLDataTable/ParsingOptions/skipRows)

The number of starting rows to skip from the start of a CSV file.

[`skipInitialSpaces`](/documentation/CreateML/MLDataTable/ParsingOptions/skipInitialSpaces)

A Boolean value indicating whether to ignore leading spaces of a
data field.

[`comment`](/documentation/CreateML/MLDataTable/ParsingOptions/comment)

The character that marks the beginning of a comment, or text to
ignore, in a CSV file.

### Limiting rows and columns

[`maxRows`](/documentation/CreateML/MLDataTable/ParsingOptions/maxRows)

The maximum number of rows to import form a CSV file; otherwise
`nil` to import all rows.

[`selectColumns`](/documentation/CreateML/MLDataTable/ParsingOptions/selectColumns)

The list of column names to import from a CSV file; otherwise `nil`
to import all columns.

### Representing missing values

[`missingValues`](/documentation/CreateML/MLDataTable/ParsingOptions/missingValues)

A list of strings that represent missing values in a CSV file.

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Sendable`](/documentation/Swift/Sendable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)