def zero_to_one(table, option):
if option == '<STR_LIT>':<EOL><INDENT>m = min(min(table))<EOL>ma = max(max(table))<EOL><DEDENT>t = []<EOL>for row in table:<EOL><INDENT>t_row = []<EOL>if option != '<STR_LIT>':<EOL><INDENT>m, ma = min(row), max(row)<EOL><DEDENT>for i in row:<EOL><INDENT>if ma == m:<EOL><INDENT>t_row.append(<NUM_LIT:0>)<EOL><DEDENT>else:<EOL><INDENT>t_row.append((i - m)/(ma - m))<EOL><DEDENT><DEDENT>t.append(t_row)<EOL><DEDENT>return t<EOL>
normalize from zero to one for row or table