EXPAND ALL
- Home
- About Pixie
- Installing Pixie
- Using Pixie
- Tutorials
- Reference
This function splits a string by a delimiter and returns a JSON encoded array of strings. The function is useful for splitting strings and then passing the result to px.pluck_array in order to access individual values of a delimited string.
A JSON encoded array of the split strings.
| Variable | Type | Description |
|---|---|---|
| input_str | STRING | The string to split. |
| delimiter | STRING | The string value to split the input string. |
df = px.DataFrame('http_events', start_time='-5m')# Returns By=http://frontend.px.dev;URI=http://testclient.px.devdf.xfcc_hdr = px.pluck(df.req_headers, 'X-Forwarded-Client-Cert')df.xfcc_parts = px.split(df.xfcc_hdr, ';')df.by = px.pluck_array(df.xfcc_hdr, 0) # Returns "By=http://frontend.px.dev"df.uri = px.pluck_array(df.xfcc_hdr, 1) # Returns "URI=http://testclient.px.dev"