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

Method num_row_groups

python/pyarrow/parquet/core.py:418–435  ·  view source on GitHub ↗

Return the number of row groups of the Parquet file. Examples -------- >>> import pyarrow as pa >>> table = pa.table({'n_legs': [2, 2, 4, 4, 5, 100], ... 'animal': ["Flamingo", "Parrot", "Dog", "Horse", ...

(self)

Source from the content-addressed store, hash-verified

416
417 @property
418 def num_row_groups(self):
419 """
420 Return the number of row groups of the Parquet file.
421
422 Examples
423 --------
424 >>> import pyarrow as pa
425 >>> table = pa.table({'n_legs': [2, 2, 4, 4, 5, 100],
426 ... 'animal': ["Flamingo", "Parrot", "Dog", "Horse",
427 ... "Brittle stars", "Centipede"]})
428 >>> import pyarrow.parquet as pq
429 >>> pq.write_table(table, 'example.parquet')
430 >>> parquet_file = pq.ParquetFile('example.parquet')
431
432 >>> parquet_file.num_row_groups
433 1
434 """
435 return self.reader.num_row_groups
436
437 def close(self, force: bool = False):
438 if self._close_source or force:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected