StringEncoder#
- class pinnx.utils.transformers.StringEncoder(dtype=<class 'str'>)[source]#
StringEncoder transform.
The transform will cast everything to a string and the inverse transform will cast to the type defined in dtype.
- fit(X)[source]#
Fit a list or array of categories. All elements must be from the same type.
- Parameters:
X (array-like, shape=(n_categories,)) – List of categories.