def new_id_map(df, next_id):
    """ Creates a new id for each record in df, starting with next_id """

    segids = df.index.tolist()

    id_map = {segid: n for (segid, n) in
              zip(segids, range(next_id, next_id+len(segids)))}

    return id_map, next_id+len(segids)