pyarrow.compute.ascii_trim#
- pyarrow.compute.ascii_trim(strings, /, characters, *, options=None, memory_pool=None)#
修剪前导和尾随字符。
对于 strings 中的每个字符串,移除 characters 选项(如 TrimOptions 中所指定)中指定的首尾字符。空值(Null)保持为空。 strings 和 characters 均被视为 ASCII 字符;若要修剪非 ASCII 字符,请使用 utf8_trim。
- 参数:
- strings类数组或类标量
计算函数的参数。
- characters
str 需要从字符串末尾修剪的单个字符。
- options
pyarrow.compute.TrimOptions, 可选 传递选项的替代方式。
- memory_pool
pyarrow.MemoryPool, 可选 如果不传递,将从默认内存池分配内存。