polars.internals.series.DateTimeNameSpace.with_time_unit

DateTimeNameSpace.with_time_unit(tu: str) polars.internals.series.Series

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: any of {“ns”, “us”, “ms”}