def header_col_number_mapping(worksheet_lol):
    """
    Takes a worksheet in the form of a row-major list of lists
    and returns a dictionary mapping the names of the columns to the
    column numbers, indexed from zero.
    """
    header_col_number_dict = dict()
    for col in range(len(worksheet_lol)):
        header_col_number_dict[worksheet_lol[col][0]] = col
    return header_col_number_dict