phenotypic.sdk_.external_metadata_preserved_columns#

phenotypic.sdk_.external_metadata_preserved_columns(measurement_columns: Iterable[object], metadata_columns: Iterable[object]) frozenset[str][source]#

Return the external metadata columns that keep their raw names in a join.

An external metadata table is joined onto a mixed-schema measurement frame. Its columns split in two: join keys the measurements already carry, which must keep their spelling or they match nothing, and attributes, which take the live Metadata_ spelling. A column keeps its raw name when it is not metadata-family (no known metadata member, not a Metadata_* header) and it either already exists in the measurement frame or is a known non-metadata schema header such as Grid_RowNum. Every other column is normalized with ensure_metadata_prefix().

Parameters:
  • measurement_columns (Iterable[object]) – Column names of the measurement frame.

  • metadata_columns (Iterable[object]) – Column names of the external metadata table.

Returns:

The subset of metadata_columns whose names must not be prefixed.

Return type:

frozenset[str]