From 7bf0b8e5839f95502f94280e5ad93d75e979a26f Mon Sep 17 00:00:00 2001 From: Steve Nyemba Date: Fri, 10 Jun 2022 14:52:55 -0500 Subject: [PATCH] bug fix --- data/maker/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/data/maker/__init__.py b/data/maker/__init__.py index 056cbbc..71d9c7b 100644 --- a/data/maker/__init__.py +++ b/data/maker/__init__.py @@ -98,6 +98,10 @@ class Learner(Process): # - The code below tries to address the issue (Perhaps better suited for the reading components) _log = {} for name in columns : + # + # randomly sampling 5 elements to make sense of data-types + if self._df[name].size < 5 : + continue _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 = 0 if np.sum(no_value) > 0 else ''