polars.DataTypeExpr.struct.field_dtype#
- DataTypeExpr.struct.field_dtype(
- field_name: str,
Get the DataType of field with a specific field name.
Notes
The
structnamespace has implemented__getitem__so you can also access fields by index:>>> ( ... pl.Struct({"x": pl.Int64, "y": pl.String}) ... .to_dtype_expr() ... .struct[1] ... .collect_dtype({}) ... ) String