用法:
StringMethods.url_encode() → SeriesOrIndex
返回每个字符串的 URL 编码格式。不执行格式检查。除 ASCII 字母、数字和以下字符外,所有字符都经过编码:
‘.’,’_’,’-‘,’~’
。编码使用 UTF-8 编码字节转换为十六进制。- 系列或索引。
返回:
例子:
>>> import cudf >>> s = cudf.Series(['A/B-C/D', 'e f.g', '4-5,6']) >>> s.str.url_encode() 0 A%2FB-C%2FD 1 e%20f.g 2 4-5%2C6 dtype: object >>> data = ["https://rapids.ai/start.html", ... "https://medium.com/rapids-ai"] >>> s = cudf.Series(data) >>> s.str.url_encode() 0 https%3A%2F%2Frapids.ai%2Fstart.html 1 https%3A%2F%2Fmedium.com%2Frapids-ai dtype: object
相关用法
- Python cudf.core.column.string.StringMethods.url_decode用法及代码示例
- Python cudf.core.column.string.StringMethods.upper用法及代码示例
- 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用法及代码示例
注:本文由纯净天空筛选整理自rapids.ai大神的英文原创作品 cudf.core.column.string.StringMethods.url_encode。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。