RegexGeneratoris used to create structured text. When transforming the data, it simply removes the column. When reversing the transform, it recreates the structured text in the column through a regex string.
from rdt.transformers.text import RegexGenerator
rg = RegexGenerator()
You can specify the exact regex string to use for more realistic data.
enforce_uniqueness: Whether to guarantee that the created fake data will be unique
from transformers.text import RegexGenerator
# generate values that follow the format 'ID_' followed by a 3-digit number
rg = RegexGenerator(
RegexGeneratoris useful for text columns that do not have any mathematical meaning or privacy implications. This transformers follows the regex format to generate values, which may be exactly the same as the real data depending on the exact format string.
Generally, we expect you to use this transformer for columns that represent structured, surrogate IDs, such as a primary key column.