@classmethod
    def _get_unit_factor(cls, unit):
        try:
            if isinstance(unit, str):
                unit = cls.UNIT_FACTOR_NAMES[unit]
            return cls.UNIT_FACTORS[unit]
        except KeyError:
            raise UnsupportedUnitError()
Assumes X contains only categorical features.
dataset/ETHPy150Open timofurrer/w1thermsensor/w1thermsensor/core.py/W1ThermSensor._get_unit_factor--crossover with--dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/preprocessing/data.py/OneHotEncoder._fit_transform