MCPcopy Create free account
hub / github.com/dask/dask / to_records

Method to_records

dask/dataframe/dask_expr/_collection.py:2446–2456  ·  view source on GitHub ↗
(self, index=False, lengths=None)

Source from the content-addressed store, hash-verified

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

Callers 5

test_to_recordsFunction · 0.80
test_to_records_raisesFunction · 0.80

Calls 4

map_partitionsMethod · 0.95
_validate_chunksMethod · 0.95
to_recordsFunction · 0.90
computeMethod · 0.45

Tested by 5

test_to_recordsFunction · 0.64
test_to_records_raisesFunction · 0.64