Skip to main content

col

Returns a Column based on the given column name. Supports Spark Connect.

Syntax

Python
from pyspark.databricks.sql import functions as dbf

dbf.col(col=<col>)

# Or

dbf.column(col=<col>)

Parameters

Parameter

Type

Description

col

str

The name for the column.

Returns

pyspark.sql.Column: the corresponding column instance.

Examples

Python
from pyspark.databricks.sql import functions as dbf
dbf.col('x')
Output
Column<'x'>