| [ Web Proxy ] |
| Viewing: https://dataframes.bigquery.dev/reference/api/../api/bigframes.bigquery.json_extract.html | [Back] [Original] |
Section Navigation
Extracts a JSON value and converts it to a SQL JSON-formatted STRING or
JSON value. This function uses single quotes and brackets to escape invalid
JSONPath characters in JSON keys.
Deprecated since version 2.5.0: The json_extract is deprecated and will be removed in a future version.
Use json_query instead.
Examples:
>>> import bigframes.pandas as bpd
>>> import bigframes.bigquery as bbq
>>> s = bpd.Series(['{"class": {"students": [{"id": 5}, {"id": 12}]}}'])
>>> bbq.json_extract(s, json_path="$.class")
0 {"students":[{"id":5},{"id":12}]}
dtype: string
input (bigframes.series.Series) The Series containing JSON data (as native JSON objects or JSON-formatted strings).
json_path (str) The JSON path identifying the data that you want to obtain from the input.
A new Series with the JSON or JSON-formatted STRING.
Copyright 2019, Google.
Created using Sphinx 8.1.3.
Built with the PyData Sphinx Theme 0.19.0.
| Web Proxy Viewer | New URL | Original Page |