def _generate_table_body(data, columns_order):
    """
    Function generates table body
    :param data: set of _PersonalData class objects
    :param columns_order: iterable which contains order of columns to present
    :return: str with HTML code related to table body
    """
    result = "<tbody>"
    for data_record in data:
        result += "<tr>"
        for column_name in columns_order:
            result += "<td>{value}</td>".format(value=getattr(data_record, column_name))
        result += "</tr>"
    result += "</tbody>"
    return result