Struct#

The following methods are available under the expr.struct attribute.

Expr.struct.__getitem__(item)

Return a struct field by name or by index.

Expr.struct.field(name, *more_names)

Retrieve one or multiple Struct field(s) as a new Series.

Expr.struct.unnest()

Expand the struct into its individual fields.

Expr.struct.json_encode()

Convert this struct to a string column with json values.

Expr.struct.rename_fields(names)

Rename the fields of the struct.

Expr.struct.with_fields(*exprs, **named_exprs)

Add or overwrite fields of this struct.