pyspark.sql.functions.tan#
- pyspark.sql.functions.tan(col)[source]#
Computes tangent of the input column.
New in version 1.4.0.
Changed in version 3.4.0: Supports Spark Connect.
- Parameters
- col
Column
or str angle in radians
- col
- Returns
Column
tangent of the given value, as if computed by java.lang.Math.tan()
Examples
>>> from pyspark.sql import functions as sf >>> spark.range(1).select(sf.tan(sf.pi() / 4)).show() +------------------+ | TAN((PI() / 4))| +------------------+ |0.9999999999999...| +------------------+