EXPAND ALL
  • Home

pluck

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.

Returns: STRING

The value for the key as a string.

Arguments

VariableTypeDescription
json_strSTRINGJSON data serialized as a string.
keySTRINGThe key to get the value for.

Examples:

df.quantiles = '{"p50": 5.1, "p90": 10}'
df.p50 = px.pluck(df.quantiles, 'p50') # "5.1", as a string.
This site uses cookies to provide you with a better user experience. By using Pixie, you consent to our use of cookies.