---
title: "init(hasHeaderRow:nilEncodings:trueEncodings:falseEncodings:floatingPointType:ignoresEmptyLines:usesQuoting:usesEscaping:delimiter:escapeCharacter:)"
framework: tabulardata
role: symbol
role_heading: Initializer
path: "tabulardata/csvreadingoptions/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.

## Declaration

```swift
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 doc://com.apple.TabularData/documentation/TabularData/CSVType/double or doc://com.apple.TabularData/documentation/TabularData/CSVType/float). Defaults to doc://com.apple.TabularData/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 doc://com.apple.TabularData/documentation/TabularData/CSVReadingOptions/usesEscaping is true. Defaults to backslash (\).
