def string_to_index(needle, columns):
    """Given a string, find which column index it corresponds to.

    :param needle: The string to look for.
    :param columns: The list of columns to search in.
    :returns: The index containing that string.
    :raises ValueError: Value "`needle`" not found in columns "`columns`"
    """
    for index, value in enumerate(columns):
        if needle == value:
            return index + 1

    raise ValueError("Value \"{0}\" not found in columns \"{1}\"".format(needle, columns))