def _get_pt_to_obj(cvt_archive):
    """Creates a dict from centroid index to objective value in a CVTArchive."""
    data = cvt_archive.as_pandas(include_solutions=False)
    pt_to_obj = {}
    for row in data.itertuples():
        # row.index is the centroid index. The dataframe index is row.Index.
        pt_to_obj[row.index] = row.objective
    return pt_to_obj