polars.internals.expr.ExprDateTimeNameSpace.with_time_unit

ExprDateTimeNameSpace.with_time_unit(tu: str) polars.internals.expr.Expr

Set time unit a Series of dtype Datetime or Duration. This does not modify underlying data, and should be used to fix an incorrect time unit.

Parameters
tu

Time unit for the Datetime Series: one of {“ns”, “us”, “ms”}