'Transform list of values to sparse/dense column array.'

@staticmethod
def _to_column(x, to_sparse, dtype=None):

    x = np.array(x, dtype=dtype).reshape((-1), 1)
    if to_sparse:
        x = sp.csc_matrix(x)
    return x
