<!--
{
  "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/DataFrame/init(contentsOfSFrameDirectory:columns:rows:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "TabularData"
    ],
    "preciseIdentifier" : "s:11TabularData0B5FrameV25contentsOfSFrameDirectory7columns4rowsAC10Foundation3URLV_SaySSGSgSnySiGSgtKcfc"
  },
  "title" : "init(contentsOfSFrameDirectory:columns:rows:)"
}
-->

# init(contentsOfSFrameDirectory:columns:rows:)

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

```
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> Throws: An `SFrameReadingError` instance.

---

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)