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

Method write

python/pyarrow/parquet/core.py:1156–1173  ·  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

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

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