用法:
StringMethods.lstrip(to_strip: str = None) → SeriesOrIndex
刪除前導和尾隨字符。
從左側的係列/索引中的每個字符串中去除空格(包括換行符)或一組指定字符。等效於 str.lstrip() 。
- to_strip:str 或無,默認無
指定要刪除的字符集。這組字符的所有組合都將被刪除。如果 None 則刪除空格。
- 對象的係列或索引
參數:
返回:
例子:
>>> import cudf >>> s = cudf.Series(['1. Ant. ', '2. Bee!\n', '3. Cat?\t', None]) >>> s.str.lstrip('123.') 0 Ant. 1 Bee!\n 2 Cat?\t 3 <NA> dtype: object
相關用法
- Python cudf.core.column.string.StringMethods.len用法及代碼示例
- Python cudf.core.column.string.StringMethods.lower用法及代碼示例
- Python cudf.core.column.string.StringMethods.ljust用法及代碼示例
- 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用法及代碼示例
注:本文由純淨天空篩選整理自rapids.ai大神的英文原創作品 cudf.core.column.string.StringMethods.lstrip。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。