denselinkage.linkage.candidate_pairs_from_frame¶
- denselinkage.linkage.candidate_pairs_from_frame(frame: pd.DataFrame, *, left: Source, right: Source, left_id: str, right_id: str, similarity: str | None = None) list[CandidatePair][source]¶
Build
CandidatePairobjects from a frame of candidate id-pairs and the two sources they reference — the ergonomic input toDenseLinker.match_pairswhen blocking happened elsewhere (rule-based / external / a join).Each row pairs
frame[left_id]withframe[right_id]; record text is materialized fromleft/rightvia their serializers (the same textlinkwould produce), so content-aware matchers work.similaritynames an optional score column — absent, or aNaNcell, yieldsCandidatePair.similarity_score = None.Raises
ValueErrorif a named column is absent fromframeor a row references an id not present in its source.left/rightare read through the sameRecordReaderseam aslink(so itsdenselinkage.core.errorstaxonomy applies to the sources themselves).