sdv.constraints.Constraint.transform

Constraint.transform(table_data)[source]

Perform necessary transformations needed by constraint.

Subclasses can optionally overwrite this method. If the transformation requires certain columns to be present in table_data, then the subclass should overwrite the _transform method instead. This method raises a MissingConstraintColumnError if the table_data is missing any columns needed to do the transformation. If columns are present, this method will call the _transform method.

Parameters

table_data (pandas.DataFrame) – Table data.

Returns

Input data unmodified.

Return type

pandas.DataFrame