def set_column_sequence(dataframe, seq):
    """
    Returns pandas DataFrame with the columns named in seq as first columns.
    
    :param dataframe: pandas DataFrame to be resorted according to seq.
    :param seq: array of column names.
    """
    cols = seq[:]
    for x in dataframe.columns:
        if x not in cols:
            cols.append(x)
    return dataframe[cols]
