From e4b164a34b142212379692172ae18dcf9e802af3 Mon Sep 17 00:00:00 2001 From: Steve Nyemba Date: Thu, 9 Apr 2020 19:21:25 -0500 Subject: [PATCH] bug fix with typing --- pipeline.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pipeline.py b/pipeline.py index 4cac273..3950942 100644 --- a/pipeline.py +++ b/pipeline.py @@ -168,9 +168,14 @@ class Components : # How many rows sub-partition must we divide this into ? # let us fix the data types here every _id field will be an np.int64... # + for name in df.columns.tolist(): + if name.endswith('_id') : - df[name] = df[name].astype(np.int64) + if df[name].isnull().sum() > 0 : + df[name].fillna(0,inplace=True) + else: + df[name] = df[name].astype(np.int64) _dc = pd.DataFrame()