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

Method write

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

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

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