def same_class(instances, class_index):
    """ Determines if all the instances have the same class label

    :param instances: table
    :param class_index: index of the class label
    :return: True if all have same class label flase otherwise
    """
    label = instances[0][class_index]
    for row in instances:
        if row[class_index] != label:
            return False
    return True