with_unit¶
- View.with_unit(names, unit, comparison_only=False)[source]¶
Returns a view that contains a new unit on one or more columns.
- Args:
- 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.