'Where can I find datatypes to which I can cast in polars?
Where can I find datatypes to which I can cast in polars?
This is the second time I am searching for this and I cannot find the right reference for them. There are types in the User's Guide, but it is not mentioned how to call those types. Also there is no mentioning of the data types in the Python Documentation.
Solution 1:[1]
All the types you read in the user guide are available under the polars namespace. So:
import polars as pl
# available data types
pl.Int8
pl.Int16
pl.Int32
pl.Int64
pl.UInt8
pl.UInt16
pl.UInt32
pl.UInt64
pl.Float32
pl.Float64
pl.Boolean
pl.Utf8
pl.List
pl.Date
pl.Datetime
pl.Duration
pl.Time
pl.Struct
pl.Object
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | ritchie46 |
