---
title: "fitted(to:eventHandler:)"
framework: createmlcomponents
role: symbol
role_heading: Instance Method
path: "createmlcomponents/tabularestimator/fitted(to:eventhandler:)"
---

# fitted(to:eventHandler:)

Fits a transformer to a data frame

## Declaration

```swift
func fitted(to input: DataFrame, eventHandler: EventHandler?) async throws -> Self.Transformer
```

## Parameters

- `input`: A data frame containing examples.
- `eventHandler`: An event handler.

## Return Value

Return Value The fitted transformer.

## See Also

### Adapting and fitting

- [adaptedAsSupervised(annotationColumnID:)](createmlcomponents/tabularestimator/adaptedassupervised(annotationcolumnid:).md)
- [fitted(to:)](createmlcomponents/tabularestimator/fitted(to:).md)
