phenotypic.util.generate_output_key#

phenotypic.util.generate_output_key(df: DataFrame | DataFrame) pandas.DataFrame[source]#

Generate a column-description key for recognized output columns.

Parameters:

df (DataFrame | DataFrame) – A pandas or polars measurements DataFrame.

Returns:

A pandas DataFrame with column_header and description columns, preserving the input column order and omitting columns that are not backed by a public MeasurementInfo member.

Raises:

TypeError – If df is not a pandas or polars DataFrame.

Return type:

pandas.DataFrame