polars.LazyFrame.dtypes
-
Get the column data types.
- Returns:
-
- list of DataType
-
A list containing the data type of each column in order.
Warning
Determining the data types of a LazyFrame requires resolving its schema, which is a potentially expensive operation. Using
collect_schema()is the idiomatic way to resolve the schema. This property exists only for symmetry with the DataFrame class.See also
-
collect_schema -
Schema.dtypes
Examples
>>> lf = pl.LazyFrame( ... { ... "foo": [1, 2, 3], ... "bar": [6.0, 7.0, 8.0], ... "ham": ["a", "b", "c"], ... } ... ) >>> lf.dtypes [Int64, Float64, String]
property LazyFrame.dtypes: list[DataType]
© 2020 Ritchie Vink
© 2022 Polars contributors
Licensed under the MIT License.
https://docs.pola.rs/api/python/stable/reference/lazyframe/api/polars.LazyFrame.dtypes.html