Create an expression of type Duration from distinct time components.
Duration
Duration components and optional time unit.
> const df = pl.DataFrame({ add: [1, 2] });> df.select(pl.duration({ days: pl.col("add") }));shape: (2, 1)┌──────────────┐│ duration ││ --- ││ duration[μs] │╞══════════════╡│ 1d ││ 2d │└──────────────┘ Copy
> const df = pl.DataFrame({ add: [1, 2] });> df.select(pl.duration({ days: pl.col("add") }));shape: (2, 1)┌──────────────┐│ duration ││ --- ││ duration[μs] │╞══════════════╡│ 1d ││ 2d │└──────────────┘
Create an expression of type
Durationfrom distinct time components.