featurebyte.Feature.astype¶
astype(
new_type: Union[Type[int], Type[float], Type[str], Literal["int", "float", "str"]]
) -> FrozenSeriesTDescription¶
Modifies the data type of a feature. It is useful when you need to convert feature values between numerical and string formats, or the other way around.
Parameters¶
- new_type: Union[Type[int], Type[float], Type[str], Literal["int", "float", "str"]]
Desired type after conversion. Type can be provided directly, or as a string.
Returns¶
- FrozenSeriesT
A new Series with converted variable type.