present_units_columns

function of dascore.utils.pd source

present_units_columns(
    df: DataFrame ,
)-> ‘pd.DataFrame’

Expose private _{name}_units columns under public names.

Coordinate envelopes are stored and presented in each coordinate’s original units, so the unit belongs beside the values it scales: distance_min of 65.6 is self-explaining only with distance_units of ft in view. The private spellings exist for the planners (public columns are conflict-policed on merge), so only the presented frame renames them.

An existing public column is never overwritten. For frames the index builds this cannot happen: an attr whose name would claim a coordinate’s public units column is omitted from the flat view with a warning, the same rule that protects envelope columns. A frame assembled some other way keeps whatever it already had, and its private column simply stays private rather than silently replacing a value this function cannot vouch for.