pyarrow.nulls#

pyarrow.nulls(size,type=None,MemoryPoolmemory_pool=None)#

Create a strongly-typed Array instance with all elements null.

Parameters:
sizeint

Array length.

typepyarrow.DataType, defaultNone

Explicit type for the array. By default use NullType.

memory_poolMemoryPool, defaultNone

Arrow MemoryPool to use for allocations. Uses the default memorypool if not passed.

Returns:
arrArray

Examples

>>>importpyarrowaspa>>>pa.nulls(10)<pyarrow.lib.NullArray object at ...>10 nulls
>>>pa.nulls(3,pa.uint32())<pyarrow.lib.UInt32Array object at ...>[  null,  null,  null]