---
title: "init(contentsOfSFrameDirectory:columns:rows:)"
framework: tabulardata
role: symbol
role_heading: Initializer
path: "tabulardata/dataframe/init(contentsofsframedirectory:columns:rows:)"
---

# init(contentsOfSFrameDirectory:columns:rows:)

Creates a data frame from a Turi Create scalable data frame.

## Declaration

```swift
init(contentsOfSFrameDirectory url: URL, columns: [String]? = nil, rows: Range<Int>? = nil) throws
```

## Parameters

- `url`: A URL to an SFrame directory.
- `columns`: An array of column names; Set to nil to use every column in the SFrame.
- `rows`: A range of indices; Set to nil to use every row in the SFrame.

## Discussion

Discussion note: An SFrameReadingError instance.

## See Also

### Creating a Data Frame from Turi Create Types

- [ShapedData](tabulardata/shapeddata.md)
