snowflake.snowpark.functions.cot¶
- snowflake.snowpark.functions.cot(expr: Union[snowflake.snowpark.column.Column, str]) Column[source]¶
Computes the cotangent of the input column. The input should be expressed in radians.
- Parameters:
expr (ColumnOrName) – The input column or column name containing values in radians.
- Returns:
A column containing the cotangent values.
- Return type:
- Examples::
>>> from snowflake.snowpark.types import DecimalType >>> df = session.create_dataframe([[1.0471975512], [0.7853981634], [1.5707963268]], schema=["a"]) >>> df.select(cot(df["a"]).cast(DecimalType(scale=10)).alias("cot_result")).collect() [Row(COT_RESULT=Decimal('0.5773502692')), Row(COT_RESULT=Decimal('1.0000000000')), Row(COT_RESULT=Decimal('0E-10'))]