calamari.catalog.deduplicated#

calamari.catalog.deduplicated(catalog_df)#

Return a de-duplicated view of a catalog DataFrame.

Drops rows flagged is_duplicate == True (i.e. the redundant-group copy verified byte-identical to a canonical-group copy when the catalog was built – see build_catalog()). No files are rechecked here. Canonical-group entries and copies outside the requested comparison remain; this does not merge all exports of a physical measurement.

Rows flagged dup_status == 'name_collision_differs' (same filename in both groups but genuinely different content) are NOT dropped. Different bytes may mean different measurements, metadata or formatting; all are retained conservatively.

Parameters:

catalog_df (DataFrame) – A catalog DataFrame produced by build_catalog() (must contain an is_duplicate column).

Return type:

DataFrame

Returns:

pandas.DataFrame – A copy of catalog_df containing only rows with is_duplicate == False, with the index reset.

Raises:

KeyError – If catalog_df has no is_duplicate column (i.e. it was not produced by build_catalog()).