def entry_lookup(target, row, case_sensitive=True):
    """
    Return the index of a specified target value in a list.
    Throws a KeyError if no match
    :param target: str
    :param row: list
    :param case_sensitive: bool
    :return: int
    """
    if case_sensitive:
        for i in range(0, len(row)):
            if row[i] == target:
                return i
        raise KeyError('{0} not found'.format(target))
    else:
        target = target.lower()
        for i in range(0, len(row)):
            if row[i].lower() == target:
                return i
        raise KeyError('{0} not found'.format(target))