bug fix with typing

This commit is contained in:
Steve Nyemba 2020-04-09 19:21:25 -05:00
parent 944a3edbf6
commit e4b164a34b
1 changed files with 6 additions and 1 deletions

View File

@ -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()