...
This commit is contained in:
parent
0a346d7abc
commit
73115724fe
18
pipeline.py
18
pipeline.py
|
@ -216,8 +216,22 @@ class Components :
|
||||||
# #
|
# #
|
||||||
# # This will account for autopilot mode ...
|
# # This will account for autopilot mode ...
|
||||||
# df = args['data']
|
# df = args['data']
|
||||||
|
_cast = {}
|
||||||
_info = {"module":"gan-prep","action":"read","shape":{"rows":df.shape[0],"columns":df.shape[1]}}
|
if schema :
|
||||||
|
dtype = str
|
||||||
|
name = schema['name']
|
||||||
|
novalue = -1
|
||||||
|
if schema['type'] == 'INTEGER' :
|
||||||
|
dtype = np.int64
|
||||||
|
|
||||||
|
elif schema['type'] == 'FLOAT' :
|
||||||
|
dtype = np.float64
|
||||||
|
else:
|
||||||
|
novalue = ''
|
||||||
|
_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}
|
||||||
logger.write(_info)
|
logger.write(_info)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue