You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently our transformers are expected to always return a transformed column, but in some cases we would like to learn something from the column, drop it and then populate it with values during the reverse_transform.
Expected behavior
classPIITransformer(BaseTransformer):
OUTPUT_TYPES= {
'pii': 'categorical'
}
def__init__(self):
self.length=Noneself.faker=Faker()
def_fit(self, columns_data):
self.length=len(columns_data)
def_transform(self, columns_data):
returnNone# Drop the columndef_reverse_transform(self, columns_data):
return [self.faker.name() foriinrange(self.length)] # Generate the values
Problem Description
Currently our transformers are expected to always return a
transformed
column, but in some cases we would like to learn something from the column, drop it and then populate it with values during thereverse_transform
.Expected behavior
Which should lead to the following outcomes:
Which would contain only the
donation
value (thename
has been dropped).When
reverse_transforme
:A column
name
has been returned with random values, the data contains bothname
anddonation
columns.The text was updated successfully, but these errors were encountered: