From cf478016b06a023c6058012465bb16779534aac0 Mon Sep 17 00:00:00 2001 From: Steve Nyemba Date: Thu, 1 Apr 2021 12:28:09 -0500 Subject: [PATCH] ... --- pipeline.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pipeline.py b/pipeline.py index c1c5719..6f28eac 100644 --- a/pipeline.py +++ b/pipeline.py @@ -253,7 +253,10 @@ class Components : # skip_columns.append(_name) if x_cols : for _col in x_cols : - _df[_col] = self.approximate(df[_col].fillna(-1)) + if df[_col].unique().size > 0 : + _df[_col] = self.approximate(df[_col].fillna(-1)) + else: + _df[_col] = -1 # # We perform a series of set operations to insure that the following conditions are met: # - the synthetic dataset only has fields that need to be synthesized