snowflake.snowpark.Column.try_cast

Column.try_cast(to: Union[str, DataType], rename_fields: bool = False, add_fields: bool = False) Column[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.30.0/snowpark-python/src/snowflake/snowpark/column.py#L1002-L1019)

Tries to cast the value of the Column to the specified data type. It returns a NULL value instead of raising an error when the conversion can not be performed.

语言: 中文