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)
| 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 | """ |
nothing calls this directly
no test coverage detected