-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make release-tag: Merge branch 'main' into stable
- Loading branch information
Showing
66 changed files
with
2,501 additions
and
2,235 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Faker==24.11.0 | ||
Faker==25.0.1 | ||
copulas==0.11.0 | ||
numpy==1.26.4 | ||
pandas==2.2.2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,10 +2,9 @@ | |
|
||
"""Top-level package for RDT.""" | ||
|
||
|
||
__author__ = 'DataCebo, Inc.' | ||
__email__ = '[email protected]' | ||
__version__ = '1.12.0' | ||
__version__ = '1.12.1.dev2' | ||
|
||
|
||
import sys | ||
|
@@ -20,10 +19,7 @@ | |
from rdt import transformers | ||
from rdt.hyper_transformer import HyperTransformer | ||
|
||
__all__ = [ | ||
'HyperTransformer', | ||
'transformers' | ||
] | ||
__all__ = ['HyperTransformer', 'transformers'] | ||
|
||
RANDOM_SEED = 42 | ||
|
||
|
@@ -42,9 +38,10 @@ def get_demo(num_rows=5): | |
pd.DataFrame | ||
""" | ||
# Hard code first five rows | ||
login_dates = pd.Series([ | ||
'2021-06-26', '2021-02-10', 'NAT', '2020-09-26', '2020-12-22' | ||
], dtype='datetime64[ns]') | ||
login_dates = pd.Series( | ||
['2021-06-26', '2021-02-10', 'NAT', '2020-09-26', '2020-12-22'], | ||
dtype='datetime64[ns]', | ||
) | ||
email_optin = pd.Series([False, False, False, True, np.nan], dtype='object') | ||
credit_card = ['VISA', 'VISA', 'AMEX', np.nan, 'DISCOVER'] | ||
age = [29, 18, 21, 45, 32] | ||
|
@@ -55,7 +52,7 @@ def get_demo(num_rows=5): | |
'email_optin': email_optin, | ||
'credit_card': credit_card, | ||
'age': age, | ||
'dollars_spent': dollars_spent | ||
'dollars_spent': dollars_spent, | ||
}) | ||
|
||
if num_rows <= 5: | ||
|
@@ -67,14 +64,18 @@ def get_demo(num_rows=5): | |
try: | ||
num_rows -= 5 | ||
|
||
login_dates = np.array([ | ||
np.datetime64('2000-01-01') + np.timedelta64(np.random.randint(0, 10000), 'D') | ||
for _ in range(num_rows) | ||
], dtype='datetime64[ns]') | ||
login_dates = np.array( | ||
[ | ||
np.datetime64('2000-01-01') + np.timedelta64(np.random.randint(0, 10000), 'D') | ||
for _ in range(num_rows) | ||
], | ||
dtype='datetime64[ns]', | ||
) | ||
login_dates[np.random.random(size=num_rows) > 0.8] = np.datetime64('NaT') | ||
|
||
email_optin = pd.Series([True, False, np.nan], dtype='object').sample( | ||
num_rows, replace=True) | ||
num_rows, replace=True | ||
) | ||
credit_card = np.random.choice(['VISA', 'AMEX', np.nan, 'DISCOVER'], size=num_rows) | ||
age = np.random.randint(18, 100, size=num_rows) | ||
|
||
|
@@ -84,16 +85,19 @@ def get_demo(num_rows=5): | |
finally: | ||
np.random.set_state(random_state) | ||
|
||
return pd.concat([ | ||
data, | ||
pd.DataFrame({ | ||
'last_login': login_dates, | ||
'email_optin': email_optin, | ||
'credit_card': credit_card, | ||
'age': age, | ||
'dollars_spent': dollars_spent | ||
}) | ||
], ignore_index=True) | ||
return pd.concat( | ||
[ | ||
data, | ||
pd.DataFrame({ | ||
'last_login': login_dates, | ||
'email_optin': email_optin, | ||
'credit_card': credit_card, | ||
'age': age, | ||
'dollars_spent': dollars_spent, | ||
}), | ||
], | ||
ignore_index=True, | ||
) | ||
|
||
|
||
def _get_addon_target(addon_path_name): | ||
|
@@ -159,7 +163,7 @@ def _find_addons(): | |
try: | ||
addon = entry_point.load() | ||
except Exception: # pylint: disable=broad-exception-caught | ||
msg = f'Failed to load "{entry_point.name}" from "{entry_point.version}".' | ||
msg = f'Failed to load "{entry_point.name}" from "{entry_point.value}".' | ||
warnings.warn(msg) | ||
continue | ||
|
||
|
Oops, something went wrong.