Skip to content

Commit

Permalink
adding key columns before reversing constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
amontanez24 committed Jul 28, 2023
1 parent bfed446 commit 794c5e5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sdv/data_processing/data_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,7 @@ def reverse_transform(self, data, reset_keys=False):
if self._keys and num_rows:
generated_keys = self.generate_keys(num_rows, reset_keys)
sampled_columns.extend(self._keys)
reversed_data[generated_keys.columns] = generated_keys[generated_keys.notna()]

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

0 comments on commit 794c5e5

Please sign in to comment.