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 CandidatePair objects from a frame of candidate id-pairs and the two sources they reference — the ergonomic input to DenseLinker.match_pairs when blocking happened elsewhere (rule-based / external / a join).

Each row pairs frame[left_id] with frame[right_id]; record text is materialized from left / right via their serializers (the same text link would produce), so content-aware matchers work. similarity names an optional score column — absent, or a NaN cell, yields CandidatePair.similarity_score = None.

Raises ValueError if a named column is absent from frame or a row references an id not present in its source. left / right are read through the same RecordReader seam as link (so its denselinkage.core.errors taxonomy applies to the sources themselves).