convert_durations#

pylibcudf.strings.convert.convert_durations.from_durations(Column durations, unicode format=None) Column#

Returns a new strings column converting a duration column into strings using the provided format pattern.

For details, see cpp:func:cudf::strings::from_durations

Parameters:
durationsColumn

Duration values to convert.

formatstr

The string specifying output format. Default format is “%D days %H:%M:%S”.

Returns:
Column

New strings column with formatted durations.

pylibcudf.strings.convert.convert_durations.to_durations(Column input, DataType duration_type, unicode format) Column#

Returns a new duration column converting a strings column into durations using the provided format pattern.

For details, see cpp:func:cudf::strings::to_durations

Parameters:
inputColumn

Strings instance for this operation.

duration_typeDataType

The duration type used for creating the output column.

formatstr

String specifying the duration format in strings.

Returns:
Column

New duration column.