EXPAND ALL
  • Home

strip_prefix

Returns the string with the prefix removed. Will return the same string if the prefix not found.

Returns: STRING

`string` with `prefix` removed from the beginning if it existed.

Arguments

VariableTypeDescription
prefixSTRINGThe prefix to remove.
stringSTRINGThe string value to strip the prefix from.

Examples:

# df.service is `pl/kelvin`
df.removed_pl = px.strip_prefix('pl/', df.service) # "kelvin"
This site uses cookies to provide you with a better user experience. By using Pixie, you consent to our use of cookies.