set_unit(names, unit, comparison_only=False)¶
Assigns a new unit to one or more columns.
names (str or List[str]): The name or names of the column.
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.
If True, this will append “, comparison only” to the unit. The feature learning algorithms and the feature selectors will interpret this accordingly.
TypeError: If any of the input arguments is of wrong type.
- ValueError: If one of the provided names does not correspond to
an existing column.