From 1d0bbce74819bd83763ca833a29c87ee842e0fa7 Mon Sep 17 00:00:00 2001 From: Steve Nyemba Date: Mon, 16 May 2022 13:59:58 -0500 Subject: [PATCH] bug fixes data format --- data/maker/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/data/maker/__init__.py b/data/maker/__init__.py index 50abfd2..42af8f9 100644 --- a/data/maker/__init__.py +++ b/data/maker/__init__.py @@ -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: