From fcce378d7aa3ef80c12ef536485f5801feafe913 Mon Sep 17 00:00:00 2001 From: Drew McNutt Date: Wed, 25 Sep 2024 11:11:00 -0400 Subject: [PATCH 1/2] pd.append -> pd.concat --- tdc/utils/split.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tdc/utils/split.py b/tdc/utils/split.py index c1eef453..e222971d 100644 --- a/tdc/utils/split.py +++ b/tdc/utils/split.py @@ -351,8 +351,8 @@ def create_group_split(train_val, seed, holdout_frac, group_column): train_val_temp = train_val[train_val[group_column] == i] np.random.seed(seed) msk = np.random.rand(len(train_val_temp)) < (1 - holdout_frac) - train_df = train_df.append(train_val_temp[msk]) - val_df = val_df.append(train_val_temp[~msk]) + train_df = pd.concat([train_df,train_val_temp[msk]], axis=0) + val_df = pd.concat([val_df,train_val_temp[~msk]], axis=0) return { "train": train_df.reset_index(drop=True), From 0262f79bfcf1ff07e4ebdeed140e5bea95330132 Mon Sep 17 00:00:00 2001 From: Alejandro Velez-Arce Date: Mon, 7 Oct 2024 14:51:44 -0400 Subject: [PATCH 2/2] mend --- tdc/utils/split.py | 4 ++-- tdc/version.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tdc/utils/split.py b/tdc/utils/split.py index e222971d..3593f671 100644 --- a/tdc/utils/split.py +++ b/tdc/utils/split.py @@ -351,8 +351,8 @@ def create_group_split(train_val, seed, holdout_frac, group_column): train_val_temp = train_val[train_val[group_column] == i] np.random.seed(seed) msk = np.random.rand(len(train_val_temp)) < (1 - holdout_frac) - train_df = pd.concat([train_df,train_val_temp[msk]], axis=0) - val_df = pd.concat([val_df,train_val_temp[~msk]], axis=0) + train_df = pd.concat([train_df, train_val_temp[msk]], axis=0) + val_df = pd.concat([val_df, train_val_temp[~msk]], axis=0) return { "train": train_df.reset_index(drop=True), diff --git a/tdc/version.py b/tdc/version.py index 48a0f60f..a756386b 100644 --- a/tdc/version.py +++ b/tdc/version.py @@ -19,4 +19,4 @@ # Dev branch marker is: 'X.Y.dev' or 'X.Y.devN' where N is an integer. # 'X.Y.dev0' is the canonical version of 'X.Y.dev' # -__version__ = "1.0.7" # pragma: no cover +__version__ = "1.1.0" # pragma: no cover