pyarrow.nulls¶
- pyarrow.nulls(size, type=None, MemoryPool memory_pool=None)¶
Create a strongly-typed Array instance with all elements null.
- Parameters:
- size
int
Array length.
- type
pyarrow.DataType
, defaultNone
Explicit type for the array. By default use NullType.
- memory_pool
MemoryPool
, defaultNone
Arrow MemoryPool to use for allocations. Uses the default memory pool if not passed.
- size
- Returns:
- arr
Array
- arr
Examples
>>> import pyarrow as pa >>> pa.nulls(10) <pyarrow.lib.NullArray object at ...> 10 nulls
>>> pa.nulls(3, pa.uint32()) <pyarrow.lib.UInt32Array object at ...> [ null, null, null ]