convertTableToSdmSchema¶
- lsst.ap.association.convertTableToSdmSchema(apdbSchema, sourceTable, tableName)¶
Force a table to conform to the schema defined by the APDB.
This method uses the table definitions in
sdm_schemas
to 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_schemas
containing 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.DataFrame
A table with the correct schema for the APDB and data copied from the input
sourceTable
.