def select_relevant_id_columns(rows):
    """
    Find out which of the entries in Row.id are equal for all given rows.
    @return: A list of True/False values according to whether the i-th part of the id is always equal.
    """
    relevant_id_columns = [True] # first column (file name) is always relevant
    if rows:
        prototype_id = rows[0].id
        for column in range(1, len(prototype_id)):
            def id_equal_to_prototype(row):
                return row.id[column] == prototype_id[column]

            relevant_id_columns.append(not all(map(id_equal_to_prototype, rows)))
    return relevant_id_columns
def select_relevant_id_columns ( rows ) : relevant_id_columns = [ True ] if rows : prototype_id = rows [ 0 ] . id for column in range ( 1 , len ( prototype_id ) ) : def id_equal_to_prototype ( row ) : return row . id [ column ] == prototype_id [ column ] relevant_id_columns . append ( not all ( map ( id_equal_to_prototype , rows ) ) ) return relevant_id_columns
Find out which of the entries in Row.id are equal for all given rows.
    @return: A list of True/False values according to whether the i-th part of the id is always equal.