pyarrow.compute.utf8_trim(strings, *, memory_pool=None, options=None, characters)

Trim leading and trailing characters present in the characters arguments.

For each string in strings, emit a string with leading and trailing characters removed that are present in the characters argument. Null values emit null.

  • strings (Array-like or scalar-like) – Argument to compute function

  • memory_pool (pyarrow.MemoryPool, optional) – If not passed, will allocate memory from the default memory pool.

  • options (pyarrow.compute.TrimOptions, optional) – Parameters altering compute function semantics.

  • characters (optional) – Parameter for TrimOptions constructor. Either options or characters can be passed, but not both at the same time.