(self, index=False, lengths=None)
| 2444 | return to_csv(self, filename, **kwargs) |
| 2445 | |
| 2446 | def to_records(self, index=False, lengths=None): |
| 2447 | from dask.dataframe.dask_expr.io.records import to_records |
| 2448 | |
| 2449 | if lengths is True: |
| 2450 | lengths = tuple(self.map_partitions(len).compute()) |
| 2451 | records = to_records(self) |
| 2452 | |
| 2453 | chunks = self._validate_chunks(records, lengths) |
| 2454 | records._chunks = (chunks[0],) |
| 2455 | |
| 2456 | return records |
| 2457 | |
| 2458 | def _validate_chunks(self, arr, lengths): |
| 2459 | from collections.abc import Sequence |