Return the number of chunks the DataFrame consists of.
(self)
| 113 | return self._df.num_rows |
| 114 | |
| 115 | def num_chunks(self) -> int: |
| 116 | """ |
| 117 | Return the number of chunks the DataFrame consists of. |
| 118 | """ |
| 119 | if isinstance(self._df, pa.RecordBatch): |
| 120 | return 1 |
| 121 | else: |
| 122 | # pyarrow.Table can have columns with different number |
| 123 | # of chunks so we take the number of chunks that |
| 124 | # .to_batches() returns as it takes the min chunk size |
| 125 | # of all the columns (to_batches is a zero copy method) |
| 126 | batches = self._df.to_batches() |
| 127 | return len(batches) |
| 128 | |
| 129 | def column_names(self) -> Iterable[str]: |
| 130 | """ |
nothing calls this directly
no test coverage detected