用法:
StringMethods.detokenize(indices: cudf.Series, separator: str = ' ') → SeriesOrIndex
通过按照它们在
indices
列中出现的顺序将它们连接起来,将它们组合成字符串。separator
在每个标记之间连接。- indices:Series
每个值标识相应标记的输出行。
- separator:str
输出行中每个标记之间连接的字符串。默认为空格。
- 对象的系列或索引。
参数:
返回:
例子:
>>> import cudf >>> strs = cudf.Series(["hello", "world", "one", "two", "three"]) >>> indices = cudf.Series([0, 0, 1, 1, 2]) >>> strs.str.detokenize(indices) 0 hello world 1 one two 2 three dtype: object
相关用法
- Python cudf.core.column.string.StringMethods.is_vowel用法及代码示例
- Python cudf.core.column.string.StringMethods.endswith用法及代码示例
- Python cudf.core.column.string.StringMethods.title用法及代码示例
- Python cudf.core.column.string.StringMethods.contains用法及代码示例
- Python cudf.core.column.string.StringMethods.rsplit用法及代码示例
- Python cudf.core.column.string.StringMethods.zfill用法及代码示例
- Python cudf.core.column.string.StringMethods.hex_to_int用法及代码示例
- Python cudf.core.column.string.StringMethods.htoi用法及代码示例
- Python cudf.core.column.string.StringMethods.character_tokenize用法及代码示例
- Python cudf.core.column.string.StringMethods.normalize_characters用法及代码示例
- Python cudf.core.column.string.StringMethods.filter_alphanum用法及代码示例
- Python cudf.core.column.string.StringMethods.split用法及代码示例
- Python cudf.core.column.string.StringMethods.ngrams用法及代码示例
- Python cudf.core.column.string.StringMethods.replace_with_backrefs用法及代码示例
- Python cudf.core.column.string.StringMethods.insert用法及代码示例
- Python cudf.core.column.string.StringMethods.pad用法及代码示例
- Python cudf.core.column.string.StringMethods.replace用法及代码示例
- Python cudf.core.column.string.StringMethods.rstrip用法及代码示例
- Python cudf.core.column.string.StringMethods.replace_tokens用法及代码示例
- Python cudf.core.column.string.StringMethods.cat用法及代码示例
注:本文由纯净天空筛选整理自rapids.ai大神的英文原创作品 cudf.core.column.string.StringMethods.detokenize。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。