def transform(table, option, mode):
if option != '<STR_LIT>' and option != '<STR_LIT>' and option != '<STR_LIT>':<EOL><INDENT>print('<STR_LIT>', file=sys.stderr)<EOL>exit()<EOL><DEDENT>if option == '<STR_LIT>':<EOL><INDENT>table = transpose(table)<EOL><DEDENT>if mode == '<STR_LIT:0>':<EOL><INDENT>transformed = zero_to_one(table, option)<EOL><DEDENT>elif mode == '<STR_LIT>':<EOL><INDENT>transformed = pertotal(table, option)<EOL><DEDENT>elif mode == '<STR_LIT>':<EOL><INDENT>transformed = standardize(table, option)<EOL><DEDENT>elif mode == '<STR_LIT>':<EOL><INDENT>if option != '<STR_LIT>':<EOL><INDENT>print('<STR_LIT>', file=sys.stderr)<EOL>exit()<EOL><DEDENT>transformed = scale(table)<EOL><DEDENT>elif mode == '<STR_LIT>':<EOL><INDENT>if option != '<STR_LIT>':<EOL><INDENT>print('<STR_LIT>', file=sys.stderr)<EOL>exit()<EOL><DEDENT>transformed = log_trans(table)<EOL><DEDENT>elif mode == '<STR_LIT>':<EOL><INDENT>transformed = box_cox(table)<EOL><DEDENT>elif mode == '<STR_LIT>':<EOL><INDENT>transformed = inh(table)<EOL><DEDENT>elif mode == '<STR_LIT>':<EOL><INDENT>transformed = norm(table)<EOL><DEDENT>elif mode == '<STR_LIT>':<EOL><INDENT>transformed = diri(table)<EOL><DEDENT>else:<EOL><INDENT>print('<STR_LIT>', file=sys.stderr)<EOL>exit()<EOL><DEDENT>if option == '<STR_LIT>':<EOL><INDENT>transformed = transpose(transformed)<EOL><DEDENT>return transformed<EOL>
transform data table:
option:
    rows
    columns
    table
mode:
    0: 0-1
    pertotal: percent of total
    stand: standardize
    scale: scale based on largest column