pyspark.sql.functions.csc#

pyspark.sql.functions.csc(col)[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

>>> from pyspark.sql import functions as sf
>>> spark.range(1).select(sf.csc(sf.pi() / 2)).show()
+---------------+
|CSC((PI() / 2))|
+---------------+
|            1.0|
+---------------+