convert_datetime#

pylibcudf.strings.convert.convert_datetime.from_timestamps(Column timestamps, unicode format, Column input_strings_names) Column#

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

For details, see cpp:cudf::strings::from_timestamps.

Parameters:
timestampsColumn

Timestamp values to convert

formatstr

The string specifying output format.

input_strings_namesColumn

The string names to use for weekdays (“%a”, “%A”) and months (“%b”, “%B”).

Returns:
Column

New strings column with formatted timestamps.

pylibcudf.strings.convert.convert_datetime.is_timestamp(Column input, unicode format) Column#

Verifies the given strings column can be parsed to timestamps using the provided format pattern.

For details, see cpp:cudf::strings::is_timestamp.

Parameters:
inputColumn

Strings instance for this operation.

formatstr

String specifying the timestamp format in strings.

Returns:
Column

New bool column.

pylibcudf.strings.convert.convert_datetime.to_timestamps(Column input, DataType timestamp_type, unicode format) Column#

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

For details, see cpp:cudf::strings::to_timestamps.

Parameters:
inputColumn

Strings instance for this operation.

timestamp_typeDataType

The timestamp type used for creating the output column.

formatstr

String specifying the timestamp format in strings.

Returns:
Column

New datetime column