def clean_data(self):
        # Clean up errors
        for ii in self._train_cols:
            try:
                if max(self._raw[ii]) == 'None':
                    self._raw[self._raw[ii]=='None'] = 0
                    self._raw[ii] = self._raw[ii].astype(float)
            except __HOLE__:
                continue
            except KeyError:
                continue

        # Remove features that don't appear in training data
        to_remove = []
        for ii in self._train_cols:
            if len(self._positive) == 0 or \
              min(min(self._positive[ii]), min(self._negative[ii])) == \
              max(max(self._positive[ii]), max(self._negative[ii])):
              to_remove.append(ii)
        for ii in to_remove:
            if ii != 'bias':
                self._train_cols.remove(ii)
dataset/ETHPy150Open Pinafore/qb/page_assignment/active_learning_for_matching.py/ActiveLearner.clean_data