convertDataFrameToSdmSchema¶
- lsst.ap.association.convertDataFrameToSdmSchema(apdbSchema, sourceTable, tableName)¶
Force a table to conform to the schema defined by the APDB.
This method uses the table definitions in
sdm_schemasto load the schema of the APDB, and does not actually connect to the APDB.- Parameters:
- apdbSchema
dict[str,lsst.dax.apdb.schema_model.Table] Schema from
sdm_schemascontaining the table definition to use.- sourceTable
pandas.DataFrame The input table to convert.
- tableName
str Name of the table in the schema to use.
- apdbSchema
- Returns:
pandas.DataFrameA table with the correct schema for the APDB and data copied from the input
sourceTable.