InvertibleTableTransformer
Bases: TableTransformer
A TableTransformer
that can also undo the learned transformation after it has been applied.
Source code in src/safeds/data/tabular/transformation/_table_transformer.py
fit(table, column_names)
abstractmethod
¶
Learn a transformation for a set of columns in a table.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
table |
Table
|
The table used to fit the transformer. |
required |
column_names |
list[str] | None
|
The list of columns from the table used to fit the transformer. If |
required |
Returns:
Name | Type | Description |
---|---|---|
fitted_transformer |
InvertibleTableTransformer
|
The fitted transformer. |
Source code in src/safeds/data/tabular/transformation/_table_transformer.py
inverse_transform(transformed_table)
abstractmethod
¶
Undo the learned transformation.
The table is not modified.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
transformed_table |
Table
|
The table to be transformed back to the original version. |
required |
Returns:
Name | Type | Description |
---|---|---|
table |
Table
|
The original table. |
Raises:
Type | Description |
---|---|
TransformerNotFittedError
|
If the transformer has not been fitted yet. |