用法:
StringMethods.get_json_object(json_path)
將 JSONPath 字符串應用於輸入字符串列,其中列中的每一行都是有效的 json 字符串
- json_path: str:
要應用於輸入列的每一行的 JSONPath 字符串
- Column:包含檢索到的 json 對象字符串的新字符串列
參數:
返回:
例子:
>>> import cudf >>> s = cudf.Series( [ \"\"\" { "store":{ "book":[ { "category":"reference", "author":"Nigel Rees", "title":"Sayings of the Century", "price":8.95 }, { "category":"fiction", "author":"Evelyn Waugh", "title":"Sword of Honour", "price":12.99 } ] } } \"\"\" ]) >>> s 0 {"store": {\n "book": [\n { "cat... dtype: object >>> s.str.get_json_object("$.store.book") 0 [\n { "category": "reference",\n ... dtype: object
相關用法
- Python cudf.core.column.string.StringMethods.get用法及代碼示例
- 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用法及代碼示例
注:本文由純淨天空篩選整理自rapids.ai大神的英文原創作品 cudf.core.column.string.StringMethods.get_json_object。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。