dropDuplicateRows#

lsst.ap.association.dropDuplicateRows(catalog, index, name, log)#

Index a catalog loaded from the Apdb and drop any duplicate rows.

Where several rows share an index, the first is kept exactly as the Apdb returned it and the others are discarded. The rows stay in the order the Apdb returned them.

Parameters#

catalogpandas.DataFrame

Catalog loaded from the Apdb. Left unchanged.

indexstr or list [str]

Column or columns to index the catalog on.

namestr

Name of the catalog, for logging.

loglogging.Logger

Log to report duplicates to.

Returns#

catalogpandas.DataFrame

A new catalog, indexed by index and free of duplicates.