EXPAND ALL
  • Home

split

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.

Returns: STRING

A JSON encoded array of the split strings.

Arguments

VariableTypeDescription
input_strSTRINGThe string to split.
delimiterSTRINGThe string value to split the input string.

Examples:

df = px.DataFrame('http_events', start_time='-5m')
# Returns By=http://frontend.px.dev;URI=http://testclient.px.dev
df.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"
This site uses cookies to provide you with a better user experience. By using Pixie, you consent to our use of cookies.