daft.col#
- col(name: str) Expression [source]#
Creates an Expression referring to the column with the provided name.
See Selecting Columns Using Wildcards for details on wildcards.
Example
>>> import daft >>> df = daft.from_pydict({"x": [1, 2, 3], "y": [4, 5, 6]}) >>> df = df.select(daft.col("x")) >>> df.show() ╭───────╮ │ x │ │ --- │ │ Int64 │ ╞═══════╡ │ 1 │ ├╌╌╌╌╌╌╌┤ │ 2 │ ├╌╌╌╌╌╌╌┤ │ 3 │ ╰───────╯ (Showing first 3 of 3 rows)
- Parameters:
name – Name of column
- Returns:
Expression representing the selected column
- Return type:
Expression