cudf.core.column.string.StringMethods.code_points#

StringMethods.code_points() SeriesOrIndex#

Returns an array by filling it with the UTF-8 code point values for each character of each string. This function uses the len() method to determine the size of each sub-array of integers.

Returns:
Series or Index.

Examples

>>> import cudf
>>> s = cudf.Series(["a","xyz", "éee"])
>>> s.str.code_points()
0       97
1      120
2      121
3      122
4    50089
5      101
6      101
dtype: int32
>>> s = cudf.Series(["abc"])
>>> s.str.code_points()
0    97
1    98
2    99
dtype: int32