* DomainExtractor
The DomainExtractor
extracts domains from emails so that they can be used later for data science. It keeps the original emails so that the same exact emails can be recovered during the reverse transform.

from rdt.transformers.email import DomainExtractor
transformer = DomainExtractor()
Parameters
extracted_domain
: Which parts of the overall email domain to extract during the transformation phase
(default) 'full'
Extract the full domain, which is everything after the @ sign. For example if the email is '[email protected]'
, the full domain is 'datacebo.com'
.
'top'
Extract only the top domain, which is everything after the . character. For example if the email is '[email protected]'
, the top domain is 'com'
.
Examples
from rdt.transformers.email import DomainExtractor
transformers = DomainExtractor(extracted_domain='top')
Last updated