pyarrow.allocate_buffer

pyarrow.allocate_buffer(int64_t size, MemoryPool memory_pool=None, resizable=False)

Allocate a mutable buffer.

Parameters
  • size (int) – Number of bytes to allocate (plus internal padding)

  • memory_pool (MemoryPool, optional) – The pool to allocate memory from. If not given, the default memory pool is used.

  • resizable (bool, default False) – If true, the returned buffer is resizable.

Returns

buffer (Buffer or ResizableBuffer)