pyspark.sql.functions.csc

pyspark.sql.functions.csc(col: ColumnOrName) → pyspark.sql.column.Column[source]

Computes cosecant of the input column.

New in version 3.3.0.

Changed in version 3.4.0: Supports Spark Connect.

Parameters
colColumn or str

angle in radians.

Returns
Column

cosecant of the angle.

Examples

>>> import math
>>> df = spark.range(1)
>>> df.select(csc(lit(math.radians(90)))).first()
Row(CSC(1.57079...)=1.0)