LogoLogo
GitHubSlackDataCebo
  • RDT: Reversible Data Transforms
  • Getting Started
    • Installation
    • Quickstart
  • Usage
    • Basic Concepts
    • HyperTransformer
      • Preparation
      • Configuration
      • Transformation
  • Transformers Glossary
    • Numerical
      • ClusterBasedNormalizer
      • FloatFormatter
      • GaussianNormalizer
      • LogScaler
      • LogitScaler
      • * OutlierEncoder
      • ❖ DPECDFNormalizer
      • ❖ DPLaplaceNoiser
      • ❖ ECDFNormalizer
      • ❖ XGaussianNormalizer
    • Categorical
      • LabelEncoder
      • OrderedLabelEncoder
      • FrequencyEncoder
      • OneHotEncoder
      • OrderedUniformEncoder
      • UniformEncoder
      • BinaryEncoder
      • ❖ DPDiscreteECDFNormalizer
      • ❖ DPResponseRandomizer
      • ❖ DPWeightedResponseRandomizer
    • Datetime
      • OptimizedTimestampEncoder
      • UnixTimestampEncoder
      • ❖ DPTimestampLaplaceNoiser
    • ID
      • AnonymizedFaker
      • IndexGenerator
      • RegexGenerator
      • Treat IDs as categorical labels
    • Generic PII Anonymization
      • AnonymizedFaker
      • PseudoAnonymizedFaker
    • * Deep Data Understanding
      • * Address
        • * RandomLocationGenerator
        • * RegionalAnonymizer
      • * Email
        • * DomainBasedAnonymizer
        • * DomainBasedMapper
        • * DomainExtractor
      • * GPS Coordinates
        • * RandomLocationGenerator
        • * GPSNoiser
        • * MetroAreaAnonymizer
      • * Phone Number
        • * AnonymizedGeoExtractor
        • * NewNumberMapper
        • * GeoExtractor
  • Resources
    • Use Cases
      • Contextual Anonymization
      • Differential Privacy
      • Statistical Preprocessing
    • For Businesses
    • For Developers
Powered by GitBook
On this page
  • Parameters
  • Examples
  • Attributes
  1. Transformers Glossary
  2. * Deep Data Understanding
  3. * Phone Number

* NewNumberMapper

Previous* AnonymizedGeoExtractorNext* GeoExtractor

Last updated 6 months ago

The NewNumberMapper creates and applies a consistent mapping between real numbers and fake, synthetic numbers. The mapping preserves the geographical context of the phone numbers. That is, numbers belonging to a region are mapped to fake phone numbers in the same region.

from rdt.transformers.phone_number import NewNumberMapper

mapper = NewNumberMappper()

Parameters

default_country: If phone number does not have an international country code, provide the country code to use.

(default) None

No default country. All phone numbers must have international country codes.

<string>

Examples

from rdt.transformers.phone_number import NewNumberMapper
mapper = NewNumberMappper(default_country='US')

Attributes

After fitting the transformer, you can access the learned values through the attributes.

mapping: A dictionary that maps the original, real phone number to a new, fake phone number

>>> transformer.mapping
{
  '(617)253-3400': '(617)100-1234',
  '(617)253-2142': '(617)555-2223',
  ...
}

A string representing an ("US")

Alpha-2 country code

*SDV Enterprise Feature. This feature is available to our licensed users and is not currently in our public library. For more information, visit our page to .

Explore SDV