Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
fealho committed Jul 24, 2023
1 parent 4710b7b commit 3ba4bfa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sdv/data_processing/data_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -718,13 +718,15 @@ def reverse_transform(self, data, reset_keys=False):
sampled_columns.extend(self._keys)

for constraint in reversed(self._constraints_to_reverse):
sampled_columns = constraint.reverse_transform(sampled_columns)
reversed_data = constraint.reverse_transform(reversed_data)

# Add new columns generated by the constraint
new_columns = list(set(reversed_data.columns) - set(sampled_columns))
sampled_columns.extend(new_columns)

# Sort the sampled columns in the order of the metadata
# Sort the sampled columns in the order of the metadata.
# Any extra columns not present in the metadata will be dropped.
# In multitable there may be missing columns in the sample such as foreign keys
# And alternate keys. Thats the reason of ensuring that the metadata column is within
# The sampled columns.
Expand Down

0 comments on commit 3ba4bfa

Please sign in to comment.