ray.data.expressions.BinaryExpr.struct#
- property BinaryExpr.struct: _StructNamespace#
Access struct operations for this expression.
- Returns:
A _StructNamespace that provides struct-specific operations.
Example
>>> from ray.data.expressions import col >>> import ray >>> import pyarrow as pa >>> ds = ray.data.from_arrow(pa.table({ ... "user": pa.array([ ... {"name": "Alice", "age": 30} ... ], type=pa.struct([ ... pa.field("name", pa.string()), ... pa.field("age", pa.int32()) ... ])) ... })) >>> ds = ds.with_column("age", col("user").struct["age"])