<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "TabularData",
  "identifier" : "/documentation/TabularData/CSVReadingOptions/init(hasHeaderRow:nilEncodings:trueEncodings:falseEncodings:floatingPointType:ignoresEmptyLines:usesQuoting:usesEscaping:delimiter:escapeCharacter:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "TabularData"
    ],
    "preciseIdentifier" : "s:11TabularData17CSVReadingOptionsV12hasHeaderRow12nilEncodings04trueI005falseI017floatingPointType17ignoresEmptyLines11usesQuoting0R8Escaping9delimiter15escapeCharacterACSb_ShySSGA2nA7CSVTypeOS3bS2Jtcfc"
  },
  "title" : "init(hasHeaderRow:nilEncodings:trueEncodings:falseEncodings:floatingPointType:ignoresEmptyLines:usesQuoting:usesEscaping:delimiter:escapeCharacter:)"
}
-->

# init(hasHeaderRow:nilEncodings:trueEncodings:falseEncodings:floatingPointType:ignoresEmptyLines:usesQuoting:usesEscaping:delimiter:escapeCharacter:)

Creates a set of options for reading a CSV file.

```
init(hasHeaderRow: Bool = true, nilEncodings: Set<String> = ["", "#N/A", "#N/A N/A", "#NA", "N/A", "NA", "NULL", "n/a", "nil", "null"], trueEncodings: Set<String> = ["1", "True", "TRUE", "true"], falseEncodings: Set<String> = ["0", "False", "FALSE", "false"], floatingPointType: CSVType = .double, ignoresEmptyLines: Bool = true, usesQuoting: Bool = true, usesEscaping: Bool = false, delimiter: Character = Character(","), escapeCharacter: Character = Character("\\"))
```

## Parameters

`hasHeaderRow`

A Boolean value that indicates whether the CSV file has a header row. Defaults to `true`.

`nilEncodings`

A list of recognized encodings of `nil`. Defaults to
`["", "#N/A", "#N/A N/A", "#NA", "N/A", "NA", "NULL", "n/a", "null"]`.

`trueEncodings`

A list of acceptable encodings of `true`. Defaults to `["1", "True", "TRUE", "true"]`.

`falseEncodings`

A list of acceptable encodings of `false`. Defaults to `["0", "False", "FALSE", "false"]`.

`floatingPointType`

A type to use for floating-point numeric values
(either [`CSVType.double`](/documentation/TabularData/CSVType/double) or [`CSVType.float`](/documentation/TabularData/CSVType/float)).
Defaults to [`CSVType.double`](/documentation/TabularData/CSVType/double).

`ignoresEmptyLines`

A Boolean value that indicates whether to ignore empty lines. Defaults to `true.`

`usesQuoting`

A Boolean value that indicates whether the CSV file uses quoting. Defaults to `true`.

`usesEscaping`

A Boolean value that indicates whether the CSV file uses escaping sequences. Defaults to
`false`.

`delimiter`

A field delimiter. Defaults to comma (`,`).

`escapeCharacter`

An escape character to use if [`usesEscaping`](/documentation/TabularData/CSVReadingOptions/usesEscaping) is true. Defaults to backslash (`\`).

---

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)