---
title: "init(csvData:columns:rows:options:)"
framework: tabulardata
role: symbol
role_heading: Initializer
path: "tabulardata/dataframe/init(csvdata:columns:rows:options:)"
---

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

Creates a data frame from CSV data.

## Declaration

```swift
init<each T>(csvData data: Data, columns: repeat ColumnID<each T>, rows: Range<Int>? = nil, options: CSVReadingOptions = .init()) throws
```

## Parameters

- `data`: The contents of a CSV file.
- `columns`: The column identifiers.
- `rows`: A range of indices; Set to nil to use every row in the CSV file.
- `options`: The options that tell the data frame how to read the CSV data.
