pyarrow.concat_arrays#

pyarrow.concat_arrays(arrays,MemoryPoolmemory_pool=None)#

Concatenate the given arrays.

The contents of the input arrays are copied into the returned array.

Parameters:
arraysiterable ofpyarrow.Array

Arrays to concatenate, must be identically typed.

memory_poolMemoryPool, defaultNone

For memory allocations. If None, the default pool is used.

Raises:
ArrowInvalid

If not all of the arrays have the same type.

Examples

>>>importpyarrowaspa>>>arr1=pa.array([2,4,5,100])>>>arr2=pa.array([2,4])>>>pa.concat_arrays([arr1,arr2])<pyarrow.lib.Int64Array object at ...>[  2,  4,  5,  100,  2,  4]