def rename_dupe_cols(cols):
    """
    Renames duplicate columns in order of occurrence.
    columns [0, 0, 0, 0]
    turn into [0, 1, 2, 3]

    columns [name10, name10, name10, name10]
    turn into [name10, name11, name12, name13]

    :param cols: iterable of columns
    :return: unique columns with digits incremented.
    """
    cols = [str(c) for c in cols]
    new_cols = []
    for i in range(len(cols)):
        c = cols.pop(0)
        while c in new_cols:
            try:
                num = int(''.join(x for x in c if x.isdigit()))
                c = c.replace(str(num), str(num + 1))
            except:
                c = c + str(2)
        new_cols.append(c)
    return new_cols