dft = Drift_thresholder()
df = dft.fit_transform(df)
There jumps an IndexError: only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices
IndexError Traceback (most recent call last)
in ()
1 dft = Drift_thresholder()
----> 2 df = dft.fit_transform(df)
/usr/local/lib/python3.4/site-packages/mlbox/preprocessing/drift_thresholder.py in fit_transform(self, df)
108 print("computing drifts ...")
109
--> 110 ds.fit(pp.transform(df['train']), pp.transform(df['test']))
111
112 if (self.verbose):
/usr/local/lib/python3.4/site-packages/mlbox/preprocessing/drift/drift_threshold.py in fit(self, df_train, df_test)
163 self.stratify,
164 self.random_state)
--> 165 for col in df_train.columns)
166
167 for i, col in enumerate(df_train.columns):
/usr/local/lib/python3.4/site-packages/joblib/parallel.py in __call__(self, iterable)
777 # was dispatched. In particular this covers the edge
778 # case of Parallel used with an exhausted iterator.
--> 779 while self.dispatch_one_batch(iterator):
780 self._iterating = True
781 else:
/usr/local/lib/python3.4/site-packages/joblib/parallel.py in dispatch_one_batch(self, iterator)
618
619 with self._lock:
--> 620 tasks = BatchedCalls(itertools.islice(iterator, batch_size))
621 if len(tasks) == 0:
622 # No more tasks available in the iterator: tell caller to stop.
/usr/local/lib/python3.4/site-packages/joblib/parallel.py in __init__(self, iterator_slice)
125
126 def __init__(self, iterator_slice):
--> 127 self.items = list(iterator_slice)
128 self._size = len(self.items)
129
/usr/local/lib/python3.4/site-packages/mlbox/preprocessing/drift/drift_threshold.py in (.0)
163 self.stratify,
164 self.random_state)
--> 165 for col in df_train.columns)
166
167 for i, col in enumerate(df_train.columns):
/usr/local/lib64/python3.4/site-packages/pandas/core/indexing.py in __getitem__(self, key)
1284 return self._getitem_tuple(key)
1285 else:
-> 1286 return self._getitem_axis(key, axis=0)
1287
1288 def _getitem_axis(self, key, axis=0):
/usr/local/lib64/python3.4/site-packages/pandas/core/indexing.py in _getitem_axis(self, key, axis)
1573 self._is_valid_integer(key, axis)
1574
-> 1575 return self._get_loc(key, axis=axis)
1576
1577 def _convert_to_indexer(self, obj, axis=0, is_setter=False):
/usr/local/lib64/python3.4/site-packages/pandas/core/indexing.py in _get_loc(self, key, axis)
94
95 def _get_loc(self, key, axis=0):
---> 96 return self.obj._ixs(key, axis=axis)
97
98 def _slice(self, obj, axis=0, kind=None):
/usr/local/lib64/python3.4/site-packages/pandas/core/frame.py in _ixs(self, i, axis)
1904 return self[i]
1905 else:
-> 1906 label = self.index[i]
1907 if isinstance(label, Index):
1908 # a location index by definition
/usr/local/lib64/python3.4/site-packages/pandas/indexes/base.py in __getitem__(self, key)
1265
1266 key = _values_from_object(key)
-> 1267 result = getitem(key)
1268 if not lib.isscalar(result):
1269 return promote(result)
when I use
dft = Drift_thresholder() df = dft.fit_transform(df) There jumps an IndexError: only integers, slices (
:
), ellipsis (...
), numpy.newaxis (None
) and integer or boolean arrays are valid indicesIndexError Traceback (most recent call last)