'Return transformed column from the data by extracting the column view
from the data and passing it to the `transform` method.'

def __call__(self, data):

    inst = isinstance(data, Instance)
    if inst:
        data = Table(data.domain, [data])
    if self.variable.is_primitive():
        domain = Domain([self.variable])
        data = Table.from_table(domain, data)
        col = data.X
    else:
        domain = Domain([], metas=[self.variable])
        data = Table.from_table(domain, data)
        col = data.metas
    if (not sp.issparse(col)):
        col = col.squeeze(axis=1)
    transformed = self.transform(col)
    if inst:
        transformed = transformed[0]
    return transformed
