polars.LazyFrame.schema

property LazyFrame.schema: Dict[str, Type[polars.datatypes.DataType]]

Get a dict[column name, DataType]

Examples

>>> lf = pl.DataFrame(
...     {
...         "foo": [1, 2, 3],
...         "bar": [6.0, 7.0, 8.0],
...         "ham": ["a", "b", "c"],
...     }
... ).lazy()
>>> lf.schema
{'foo': <class 'polars.datatypes.Int64'>, 'bar': <class 'polars.datatypes.Float64'>, 'ham': <class 'polars.datatypes.Utf8'>}