cudf.core.column.string.StringMethods.code_points#
- StringMethods.code_points() SeriesOrIndex[source]#
返回一个数组,通过用每个字符串的每个字符的UTF-8代码点值填充它。 此函数使用
len()方法来确定每个整数子数组的大小。- Returns:
- Series or Index.
示例
>>> 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