说我有
In [22]: import pyarrow as pa
In [23]: t = pa.table({'a': ['one', 'two', 'three']})
我想'_frobenius'
将'a'
预期输出:
pyarrow.Table
a: string
----
a: [["one_frobenius","two_frobenius","three_frobenius"]]
说我有
In [22]: import pyarrow as pa
In [23]: t = pa.table({'a': ['one', 'two', 'three']})
我想'_frobenius'
将'a'
预期输出:
pyarrow.Table
a: string
----
a: [["one_frobenius","two_frobenius","three_frobenius"]]
您可以使用
pyarrow.compute.binary_join_element_wise
将固定字符串连接到每个元素:输出:
您可以转换为 pandas Dataframe,修改字符串,然后再转换回来。例如,