bug fix: errors occasionally
This commit is contained in:
parent
7bf0b8e583
commit
7e92571d0a
|
@ -105,8 +105,10 @@ class Learner(Process):
|
||||||
_index = np.random.choice(np.arange(self._df[name].size),5,False)
|
_index = np.random.choice(np.arange(self._df[name].size),5,False)
|
||||||
no_value = [type(value) in [int,float,np.int64,np.int32,np.float32,np.float64] for value in self._df[name].values[_index]]
|
no_value = [type(value) in [int,float,np.int64,np.int32,np.float32,np.float64] for value in self._df[name].values[_index]]
|
||||||
no_value = 0 if np.sum(no_value) > 0 else ''
|
no_value = 0 if np.sum(no_value) > 0 else ''
|
||||||
|
try:
|
||||||
self._df[name] = self._df[name].fillna(no_value)
|
self._df[name] = self._df[name].fillna(no_value)
|
||||||
|
finally:
|
||||||
|
pass
|
||||||
|
|
||||||
_log[name] = self._df[name].dtypes.name
|
_log[name] = self._df[name].dtypes.name
|
||||||
_log = {'action':'structure','input':_log}
|
_log = {'action':'structure','input':_log}
|
||||||
|
|
Loading…
Reference in New Issue