MCPcopy Create free account
hub / github.com/apache/arrow / write

Method write

python/pyarrow/parquet/core.py:1153–1170  ·  view source on GitHub ↗

Write RecordBatch or Table to the Parquet file. Parameters ---------- table_or_batch : {RecordBatch, Table} row_group_size : int, default None Maximum number of rows in each written row group. If None, the row group size will be the m

(self, table_or_batch, row_group_size=None)

Source from the content-addressed store, hash-verified

1151 return False
1152
1153 def write(self, table_or_batch, row_group_size=None):
1154 """
1155 Write RecordBatch or Table to the Parquet file.
1156
1157 Parameters
1158 ----------
1159 table_or_batch : {RecordBatch, Table}
1160 row_group_size : int, default None
1161 Maximum number of rows in each written row group. If None, the row
1162 group size will be the minimum of the number of rows in the
1163 Table/RecordBatch and 1024 * 1024.
1164 """
1165 if isinstance(table_or_batch, pa.RecordBatch):
1166 self.write_batch(table_or_batch, row_group_size)
1167 elif isinstance(table_or_batch, pa.Table):
1168 self.write_table(table_or_batch, row_group_size)
1169 else:
1170 raise TypeError(type(table_or_batch))
1171
1172 def write_batch(self, batch, row_group_size=None):
1173 """

Callers

nothing calls this directly

Calls 4

write_batchMethod · 0.95
write_tableMethod · 0.95
TypeErrorFunction · 0.50
typeEnum · 0.50

Tested by

no test coverage detected