Return the inferred Arrow schema, converted from the whole Parquet file's schema Examples -------- Generate an example Parquet file: >>> import pyarrow as pa >>> table = pa.table({'n_legs': [2, 2, 4, 4, 5, 100], ...
(self)
| 390 | |
| 391 | @property |
| 392 | def schema_arrow(self): |
| 393 | """ |
| 394 | Return the inferred Arrow schema, converted from the whole Parquet |
| 395 | file's schema |
| 396 | |
| 397 | Examples |
| 398 | -------- |
| 399 | Generate an example Parquet file: |
| 400 | |
| 401 | >>> import pyarrow as pa |
| 402 | >>> table = pa.table({'n_legs': [2, 2, 4, 4, 5, 100], |
| 403 | ... 'animal': ["Flamingo", "Parrot", "Dog", "Horse", |
| 404 | ... "Brittle stars", "Centipede"]}) |
| 405 | >>> import pyarrow.parquet as pq |
| 406 | >>> pq.write_table(table, 'example.parquet') |
| 407 | >>> parquet_file = pq.ParquetFile('example.parquet') |
| 408 | |
| 409 | Read the Arrow schema: |
| 410 | |
| 411 | >>> parquet_file.schema_arrow |
| 412 | n_legs: int64 |
| 413 | animal: string |
| 414 | """ |
| 415 | return self.reader.schema_arrow |
| 416 | |
| 417 | @property |
| 418 | def num_row_groups(self): |
nothing calls this directly
no outgoing calls
no test coverage detected