From 94780281d076eb95a225353326d12515c036caee Mon Sep 17 00:00:00 2001 From: Steve Nyemba Date: Tue, 25 Feb 2020 12:25:03 -0600 Subject: [PATCH] bug fix: iloc index missing on generate samples --- data/gan.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/gan.py b/data/gan.py index 621cea9..382dc41 100644 --- a/data/gan.py +++ b/data/gan.py @@ -616,7 +616,7 @@ class Predict(GNet): else: missing = [] i = np.where(ii == 0)[0] - df = pd.DataFrame( df.iloc.apply(lambda row: self.values[np.random.choice(np.where(row != 0)[0],1)[0]] ,axis=1)) + df = pd.DataFrame( df.iloc[i].apply(lambda row: self.values[np.random.choice(np.where(row != 0)[0],1)[0]] ,axis=1)) df.columns = columns df = df[columns[0]].append(pd.Series(missing))