def boxcox(x):
    if type(x) == pd.Series: 
        k = (conts(x)+abs(min(conts(x)))+1)
        lm = scipy.stats.boxcox(k)[1]
        if lm == 0: return log(x), lm
        else: return ((k**lm)-1)/lm, lm
    else:
        df = []; lms = []
        for col in contcol(x):
            k = (x[col]+abs(min(x[col]))+1)
            lm = scipy.stats.boxcox(k)[1]
            if lm == 0: df.append(log(x[col])); lms.append(lm)
            else: df.append(((k**lm)-1)/lm); lms.append(lm)
        return T(table(df)), array(lms)