'Called with the result of a pipeline. This needs to return an object
which can be put into the workspace to continue doing computations.
This is the inverse of :func:`~zipline.pipeline.term.Term.postprocess`.'

def to_workspace_value(self, result, assets):

    if (self.dtype == int64_dtype):
        return super(Classifier, self).to_workspace_value(result, assets)
    assert isinstance(result.values, pd.Categorical), ('Expected    a    Categorical,    got    %r.' % type(result.values))
    with_missing = pd.Series(data=pd.Categorical(result.values, result.values.categories.union([self.missing_value])), index=result.index)
    return LabelArray(super(Classifier, self).to_workspace_value(with_missing, assets), self.missing_value)
