Function polars_arrow::compute::temporal::year
source ยท pub fn year(array: &dyn Array) -> PolarsResult<PrimitiveArray<i32>>
Available on crate feature
compute_temporal
only.Expand description
Extracts the years of a temporal array as PrimitiveArray<i32>
.
Use can_year
to check if this operation is supported for the target ArrowDataType
.