def scale(table):
    """
    scale table based on the column with the largest sum
    """
    t = []
    columns = [[] for i in table[0]]
    for row in table:
        for i, v in enumerate(row):
            columns[i].append(v)
    sums = [float(sum(i)) for i in columns]
    scale_to = float(max(sums))
    scale_factor = [scale_to/i for i in sums if i != 0]
    for row in table:
        t.append([a * b for a,b in zip(row, scale_factor)])
    return t