polars::prelude::replace

Function replace_datetime

Source
pub fn replace_datetime(
    ca: &Logical<DatetimeType, Int64Type>,
    year: &ChunkedArray<Int32Type>,
    month: &ChunkedArray<Int8Type>,
    day: &ChunkedArray<Int8Type>,
    hour: &ChunkedArray<Int8Type>,
    minute: &ChunkedArray<Int8Type>,
    second: &ChunkedArray<Int8Type>,
    nanosecond: &ChunkedArray<Int32Type>,
    ambiguous: &ChunkedArray<StringType>,
) -> Result<Logical<DatetimeType, Int64Type>, PolarsError>
Available on crate feature temporal and (crate features dtype-date or dtype-datetime) and crate feature dtype-datetime only.
Expand description

Replace specific time component of a DatetimeChunked with a specified value.