Danger You are looking at the documentation for an older version of the SDV! We are no longer supporting or maintaining this version of the software Click here to go to the new docs pages.
Danger
You are looking at the documentation for an older version of the SDV! We are no longer supporting or maintaining this version of the software
Click here to go to the new docs pages.
sdv.constraints.
Constraint
Constraint base class.
This class is not intended to be used directly and should rather be subclassed to create different types of constraints.
constraint_columns
The names of the columns used by this constraint.
tuple[str]
rebuild_columns
The names of the columns that this constraint will rebuild during reverse_transform.
reverse_transform
__init__
Initialize self. See help(type(self)) for accurate signature.
Methods
__init__(*args, **kwargs)
Initialize self.
filter_valid(table_data)
filter_valid
Get only the rows that are valid.
fit(table_data)
fit
Fit Constraint class to data.
fit_transform(table_data)
fit_transform
Fit this Constraint to the data and then transform it.
from_dict(constraint_dict)
from_dict
Build a Constraint object from a dict.
is_valid(table_data)
is_valid
Say whether the given table rows are valid.
reverse_transform(table_data)
Handle logic around reverse transforming constraints.
to_dict()
to_dict
Return a dict representation of this Constraint.
transform(table_data)
transform
Perform necessary transformations needed by constraint.
Attributes