from re import X


def label_data(frame, model):
    """Predict cluster label for each tract"""
    frame["cluster"] = model.predict(X)
    ix = ["geoid", "state_abbr", "logrecno", "geo_label", "cluster"]
    return frame.reset_index().set_index(ix)