<!--
{
  "availability" : [
    "macOS: 14.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateML",
  "identifier" : "/documentation/CreateML/MLActivityClassifier/DataSource/gatherAnnotatedFeatures(featureColumns:labelColumn:recordingFileColumn:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Create ML"
    ],
    "preciseIdentifier" : "s:8CreateML20MLActivityClassifierV10DataSourceO23gatherAnnotatedFeatures14featureColumns11labelColumn013recordingFileM007TabularE00E5FrameVSaySSG_S2SSgtKF"
  },
  "title" : "gatherAnnotatedFeatures(featureColumns:labelColumn:recordingFileColumn:)"
}
-->

# gatherAnnotatedFeatures(featureColumns:labelColumn:recordingFileColumn:)

Processes the data source and returns a data frame that contains features, labels and file names.

```
func gatherAnnotatedFeatures(featureColumns: [String], labelColumn: String = "label", recordingFileColumn: String? = nil) throws -> DataFrame
```

## Parameters

`featureColumns`

The names of the feature columns.

`labelColumn`

The name of the column with the labels.

`recordingFileColumn`

The name of the column with the recording file names, if any.

---

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)