ray.data.expressions.ColumnExpr#
- class ray.data.expressions.ColumnExpr(_name: str)[source]#
Bases:
ExprExpression that references a column by name.
This expression type represents a reference to an existing column in the dataset. When evaluated, it returns the values from the specified column.
- Parameters:
name – The name of the column to reference
Example
>>> from ray.data.expressions import col >>> # Reference the "age" column >>> age_expr = col("age") # Creates ColumnExpr(name="age")
DeveloperAPI: This API may change across minor Ray releases.
Methods
Compute the absolute value of the expression.
Rename the expression.
Round values up to the nearest integer.
Compute the natural exponential of the expression.
Round values down to the nearest integer.
Check if the expression value is in a list of values.
Check if the expression value is not null.
Check if the expression value is null.
Compute the natural logarithm of the expression.
Compute the base-10 logarithm of the expression.
Compute the base-2 logarithm of the expression.
Compute the negation of the expression.
Check if the expression value is not in a list of values.
Raise the expression to the given power.
Round values to the nearest integer using PyArrow semantics.
Compute the sign of the expression.
Convert this Ray Data expression to a PyArrow compute expression.
Truncate fractional values toward zero.
Attributes
Access datetime operations for this expression.
Access list operations for this expression.
Get the column name.
Access string operations for this expression.
Access struct operations for this expression.