pyspark.sql.functions.sin#
- pyspark.sql.functions.sin(col)[source]#
Computes sine of the input column.
New in version 1.4.0.
Changed in version 3.4.0: Supports Spark Connect.
- Parameters
- col
Column
or str target column to compute on.
- col
- Returns
Column
sine of the angle, as if computed by java.lang.Math.sin()
Examples
>>> from pyspark.sql import functions as sf >>> spark.range(1).select(sf.sin(sf.pi() / 2)).show() +---------------+ |SIN((PI() / 2))| +---------------+ | 1.0| +---------------+