DataFrame.set_unit(cols, unit, comparison_only=False)[source]

Assigns a new unit to one or more columns.

columns (str, FloatColumn, StringColumn, or List[str, FloatColumn, StringColumn]):

The columns or the names thereof.

unit (str):

The unit to be assigned.

comparison_only (bool):

Whether you want the column to be used for comparison only. This means that the column can only be used in comparison to other columns of the same unit.

An example might be a bank account number: The number in itself is hardly interesting, but it might be useful to know how often we have seen that same bank account number in another table.