polars.DataTypeExpr.struct.field_names#
- DataTypeExpr.struct.field_names() Expr[source]#
Get the field names in a struct as a list.
Examples
>>> pl.select( ... pl.Struct({"x": pl.Int64, "y": pl.String}) ... .to_dtype_expr() ... .struct.field_names() ... ) shape: (2, 1) ┌─────────┐ │ literal │ │ --- │ │ str │ ╞═════════╡ │ x │ │ y │ └─────────┘