...
This commit is contained in:
parent
73115724fe
commit
856d1e4bd7
25
pipeline.py
25
pipeline.py
|
@ -218,18 +218,19 @@ class Components :
|
||||||
# df = args['data']
|
# df = args['data']
|
||||||
_cast = {}
|
_cast = {}
|
||||||
if schema :
|
if schema :
|
||||||
dtype = str
|
for _item in schem :
|
||||||
name = schema['name']
|
dtype = str
|
||||||
novalue = -1
|
name = _item['name']
|
||||||
if schema['type'] == 'INTEGER' :
|
novalue = -1
|
||||||
dtype = np.int64
|
if _item['type'] == 'INTEGER' :
|
||||||
|
dtype = np.int64
|
||||||
elif schema['type'] == 'FLOAT' :
|
|
||||||
dtype = np.float64
|
elif _item['type'] == 'FLOAT' :
|
||||||
else:
|
dtype = np.float64
|
||||||
novalue = ''
|
else:
|
||||||
_cast[schema['name']] = dtype
|
novalue = ''
|
||||||
df[name] = df[name].fillna(novalue).astype(dtype)
|
# _cast[schema['name']] = dtype
|
||||||
|
df[name] = df[name].fillna(novalue).astype(dtype)
|
||||||
|
|
||||||
_info = {"module":"gan-prep","action":"read","shape":{"rows":df.shape[0],"columns":df.shape[1]},"schema":schema}
|
_info = {"module":"gan-prep","action":"read","shape":{"rows":df.shape[0],"columns":df.shape[1]},"schema":schema}
|
||||||
logger.write(_info)
|
logger.write(_info)
|
||||||
|
|
Loading…
Reference in New Issue