EXPAND ALL
- Home
- About Pixie
- Installing Pixie
- Using Pixie
- Tutorials
- Reference
Convenience method to handle grabbing keys from a serialized JSON string. The function parses the JSON string and attempts to find the key. If the key is not found, an empty string is returned.
This function returns the value as a string. If you want an int, use px.pluck_int64
. If you want a float, use px.pluck_float64
.
The value for the key as a string.
Variable | Type | Description |
---|---|---|
json_str | STRING | JSON data serialized as a string. |
key | STRING | The key to get the value for. |
df.quantiles = '{"p50": 5.1, "p90": 10}'df.p50 = px.pluck(df.quantiles, 'p50') # "5.1", as a string.