From 773fe46cad08dc555431e404c94586e3947a34ed Mon Sep 17 00:00:00 2001 From: Alex Barros Date: Wed, 25 Sep 2024 08:50:37 -0300 Subject: [PATCH] feat: add column characteristic enum (#43) --- .../ydata/datascience/common/__init__.py | 4 +++- .../common/column_characteristic.py | 22 +++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 src/datascience/ydata/datascience/common/column_characteristic.py diff --git a/src/datascience/ydata/datascience/common/__init__.py b/src/datascience/ydata/datascience/common/__init__.py index 1d57762..210233f 100644 --- a/src/datascience/ydata/datascience/common/__init__.py +++ b/src/datascience/ydata/datascience/common/__init__.py @@ -1,8 +1,10 @@ from .privacy import PrivacyLevel from .anonymizer import AnonymizerType +from .column_characteristic import ColumnCharacteristic __all__ = [ "PrivacyLevel", - "AnonymizerType" + "AnonymizerType", + "ColumnCharacteristic" ] diff --git a/src/datascience/ydata/datascience/common/column_characteristic.py b/src/datascience/ydata/datascience/common/column_characteristic.py new file mode 100644 index 0000000..576262f --- /dev/null +++ b/src/datascience/ydata/datascience/common/column_characteristic.py @@ -0,0 +1,22 @@ +from ydata.core.enum import StringEnum + + +class ColumnCharacteristic(StringEnum): + # Adding new characteristics may require adding a new generator to: + # src/ydatasynthesizers/ydata-synthesizers/ydata/synthesizers/faker/utils.py + ID = "id" + EMAIL = "email" + URL = "url" + UUID = "uuid" + NAME = "name" + PHONE = "phone" + VAT = "vat" + IBAN = "iban" + CREDIT_CARD = "credit_card" + COUNTRY = "country" + ZIPCODE = "zipcode" + ADDRESS = "address" + PII = 'PII' + # Generic characteristic grouping Country, Address, etc. + LOCATION = 'location' + PERSON = 'person' # Generic characteristic grouping person related attributes