|
|
|
@ -287,13 +287,15 @@ class Generator (Learner):
|
|
|
|
|
#-- Sometimes data isn't all it's meant to be
|
|
|
|
|
if 'format' in self.info and name in self.info['format'] :
|
|
|
|
|
FORMAT = self.info['format'][name]
|
|
|
|
|
SIZE = 10
|
|
|
|
|
elif _item['type'] in ['DATETIME','TIMESTAMP'] :
|
|
|
|
|
FORMAT = '%Y-%m-%d %H:%M:%S'
|
|
|
|
|
SIZE = 19
|
|
|
|
|
|
|
|
|
|
r[name] = FORMAT
|
|
|
|
|
_df[name] = pd.to_datetime(_df[name], format=FORMAT) #.astype('datetime64[ns]')
|
|
|
|
|
if _item['type'] in ['DATETIME','TIMESTAMP']:
|
|
|
|
|
_df[name] = _df[name].fillna('').astype('datetime64[ns]')
|
|
|
|
|
pass #;_df[name] = _df[name].fillna('').astype('datetime64[ns]')
|
|
|
|
|
else:
|
|
|
|
|
_df[name] = _df[name].astype(str)
|
|
|
|
|
except Exception as e:
|
|
|
|
|