convert_datetime#
- pylibcudf.strings.convert.convert_datetime.from_timestamps(
- Column timestamps,
- str format,
- Column input_strings_names,
- stream=None,
- DeviceMemoryResource mr=None,
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”).
- streamStream | None
CUDA stream on which to perform the operation.
- Returns:
- Column
New strings column with formatted timestamps.
- pylibcudf.strings.convert.convert_datetime.is_timestamp(
- Column input,
- str format,
- stream=None,
- DeviceMemoryResource mr=None,
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.
- streamStream | None
CUDA stream on which to perform the operation.
- Returns:
- Column
New bool column.
- pylibcudf.strings.convert.convert_datetime.to_timestamps(
- Column input,
- DataType timestamp_type,
- str format,
- stream=None,
- DeviceMemoryResource mr=None,
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.
- streamStream | None
CUDA stream on which to perform the operation.
- Returns:
- Column
New datetime column