pyarrow.RecordBatchFileWriter

class pyarrow.RecordBatchFileWriter(sink, schema)[source]

Bases: pyarrow.lib._RecordBatchFileWriter

Writer to create the Arrow binary file format

Parameters:
  • sink (str, pyarrow.NativeFile, or file-like Python object) – Either a file path, or a writeable file object
  • schema (pyarrow.Schema) – The Arrow schema for data to be written to the file
__init__(sink, schema)[source]

Methods

__init__(sink, schema)
close(self) Close stream and write end-of-stream 0 marker
write(self, table_or_batch) Write RecordBatch or Table to stream
write_batch(self, RecordBatch batch) Write RecordBatch to stream
write_table(self, Table table) Write RecordBatch to stream
close(self)

Close stream and write end-of-stream 0 marker

write(self, table_or_batch)

Write RecordBatch or Table to stream

Parameters:table_or_batch ({RecordBatch, Table}) –
write_batch(self, RecordBatch batch)

Write RecordBatch to stream

Parameters:batch (RecordBatch) –
write_table(self, Table table)

Write RecordBatch to stream

Parameters:batch (RecordBatch) –