diff --git a/data/maker/__init__.py b/data/maker/__init__.py index 2b53def..2921b46 100644 --- a/data/maker/__init__.py +++ b/data/maker/__init__.py @@ -263,6 +263,7 @@ class Generator (Learner): pass def format(self,_df,_schema): + r = {} for _item in _schema : name = _item['name'] @@ -273,9 +274,12 @@ class Generator (Learner): else: if _item['type'] == ['DATETIME','TIMESTAMP'] : FORMAT = '%Y-%d-%m %H:%M:%S' - self.log(**{'action':'format','input':{'name':name,'format':FORMAT}}) + r[name] = FORMAT + _df[name] = pd.to_datetime(_df[name], format=FORMAT).astype(str) #.astype('datetime64[ns]') + if r : + self.log(**{'action':'format','input':r}) return _df pass