convert_datetime#
- pylibcudf.strings.convert.convert_datetime.from_timestamps(Column timestamps, unicode format, Column input_strings_names) Column #
返回一个新的字符串列,使用提供的格式模式将时间戳列转换为字符串。
详情请参见 cpp:cudf::strings::from_timestamps。
- 参数:
- timestampsColumn
要转换的时间戳值
- formatstr
指定输出格式的字符串。
- input_strings_namesColumn
用于表示工作日(“%a”, “%A”)和月份(“%b”, “%B”)的字符串名称。
- 返回:
- Column
包含格式化时间戳的新字符串列。
- pylibcudf.strings.convert.convert_datetime.is_timestamp(Column input, unicode format) Column #
验证给定的字符串列是否可以使用提供的格式模式解析为时间戳。
详情请参见 cpp:cudf::strings::is_timestamp。
- 参数:
- inputColumn
此操作的字符串实例。
- formatstr
指定字符串中时间戳格式的字符串。
- 返回:
- Column
新的布尔列。
- pylibcudf.strings.convert.convert_datetime.to_timestamps(Column input, DataType timestamp_type, unicode format) Column #
返回一个新的时间戳列,使用提供的格式模式将字符串列转换为时间戳。
详情请参见 cpp:cudf::strings::to_timestamps。
- 参数:
- inputColumn
此操作的字符串实例。
- timestamp_typeDataType
用于创建输出列的时间戳类型。
- formatstr
指定字符串中时间戳格式的字符串。
- 返回:
- Column
新的日期时间列