def get_field_locs(working_data, fields):
    """
    Finds fields index locations.

    Parameters
    ----------

    working_data: list-like
        the working data
    fields: list-like
        the field names

    Outputs
    -------

    field_locs: dict
        field-index pairs
    """

    field_locs = {x:i for i,x in enumerate(working_data) if x in fields}

    not_found = set(fields) - set(field_locs)
    if not_found:
        raise Exception(f'Missing fields {not_found}')

    return field_locs