snowflake.snowpark.functions.is_time

snowflake.snowpark.functions.is_time(col: Union[Column, str]) Column[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.16.0/src/snowflake/snowpark/functions.py#L4665-L4678)

Returns true if the specified VARIANT column contains a TIME value.

Example:

>>> import datetime
>>> from snowflake.snowpark.functions import to_variant, is_time
>>> df = session.create_dataframe([[datetime.time(10, 10), "X"]], schema=["a", "b"])
>>> df.select(is_time(to_variant("a")).as_("a"), is_time(to_variant("b")).as_("b")).collect()
[Row(A=True, B=False)]
Copy
语言: 中文