| [ Web Proxy ] |
| Viewing: https://dataframes.bigquery.dev/reference/api/bigframes.bigquery.json_value.html | [Back] [Original] |
Section Navigation
Extracts a JSON scalar value and converts it to a SQL STRING value. In
addtion, this function:
- Removes the outermost quotes and unescapes the values.
- Returns a SQL NULL if a non-scalar value is selected.
- Uses double quotes to escape invalid JSON_PATH characters in JSON keys.
Examples:
>>> import bigframes.pandas as bpd
>>> import bigframes.bigquery as bbq
>>> s = bpd.Series(['{"name": "Jakob", "age": "6"}', '{"name": "Jakob", "age": []}'])
>>> bbq.json_value(s, json_path="$.age")
0 6
1 <NA>
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-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 |