Create an expression of type Date from its components.
Date
Column or literal.
Column or literal, ranging from 1-12.
Column or literal, ranging from 1-31.
> const df = pl.DataFrame({ month: [1, 2], day: [3, 4] });> df.select(pl.date(2024, pl.col("month"), pl.col("day")));shape: (2, 1)┌────────────┐│ date ││ --- ││ date │╞════════════╡│ 2024-01-03 ││ 2024-02-04 │└────────────┘ Copy
> const df = pl.DataFrame({ month: [1, 2], day: [3, 4] });> df.select(pl.date(2024, pl.col("month"), pl.col("day")));shape: (2, 1)┌────────────┐│ date ││ --- ││ date │╞════════════╡│ 2024-01-03 ││ 2024-02-04 │└────────────┘
Create an expression of type
Datefrom its components.