EXPAND ALL
  • Home

pluck_float64

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, 0.0 is returned. If the key is found, but the value cannot be parsed as an int, returns a 0.0. This function returns the value as a float. If you want a string, use px.pluck. If you want an int, use px.pluck_int64.

Returns: FLOAT64

The value for the key as a float

Arguments

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

Examples:

df.http_data = '{"status_code": 200, "p50_latency": 5.1}'
df.p50_latency = px.pluck_float64(df.http_data, 'p50_latency') # 5.1
This site uses cookies to provide you with a better user experience. By using Pixie, you consent to our use of cookies.