def drop_duplicate_cols(df):
    """Drop duplicate column names from a DataFrame, keeping the first."""
    seen = set()
    renamer = {}
    cols = df.columns.tolist()
    for i, c in enumerate(df.columns):
        if c in seen:
            renamer[i] = c + '_dup'
            cols[i] = renamer[i]
        else:
            seen.add(c)
    df.columns = cols
    df = df.drop(renamer.values(), 1)
    return df
