EXPAND ALL
  • Home

substring

Extracts the substring from the string starting at index pos and for length characters. If pos > len(string), px.substr returns the empty string. If pos < len(string) but pos + length > len(string), px.substr returns the maximum length substring starting at pos

Returns: STRING

The substring from `string`.

Arguments

VariableTypeDescription
stringSTRINGThe string to get the substring from.
posINT64The position to start the substring, inclusive.
lengthINT64The length of the substring to return.

Examples:

df.service = 'checkout'
df.str = px.substring(df.service, 1, 5) # 'hecko'
This site uses cookies to provide you with a better user experience. By using Pixie, you consent to our use of cookies.