def box_cox(table):
from scipy.stats import boxcox as bc<EOL>t = []<EOL>for i in table:<EOL><INDENT>if min(i) == <NUM_LIT:0>:<EOL><INDENT>scale = min([j for j in i if j != <NUM_LIT:0>]) * <NUM_LIT><EOL><DEDENT>else:<EOL><INDENT>scale = <NUM_LIT:0><EOL><DEDENT>t.append(np.ndarray.tolist(bc(np.array([j + scale for j in i]))[<NUM_LIT:0>]))<EOL><DEDENT>return t<EOL>
box-cox transform table