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 writable file object
- schema (pyarrow.Schema) – The Arrow schema for data to be written to the file
Methods
__init__
(sink, schema)Initialize self. 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[, chunksize])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, chunksize=None)¶ Write RecordBatch to stream
Parameters: batch (RecordBatch) –