pyspark.sql.functions.col#
- pyspark.sql.functions.col(col)[source]#
Returns a
Column
based on the given column name.New in version 1.3.0.
Changed in version 3.4.0: Supports Spark Connect.
- Parameters
- colstr
the name for the column
- Returns
Column
the corresponding column instance.
Examples
>>> col('x') Column<'x'> >>> column('x') Column<'x'>