Dataset.to_arrow_refs() List[ObjectRef[pyarrow.Table]][source]#

Convert this Dataset into a distributed set of PyArrow tables.

One PyArrow table is created for each block in this Dataset.

This method is only supported for datasets convertible to PyArrow tables. This function is zero-copy if the existing data is already in PyArrow format. Otherwise, the data is converted to PyArrow format.


>>> import ray
>>> ds = ray.data.range(10, override_num_blocks=2)
>>> refs = ds.to_arrow_refs()
>>> len(refs)


This operation will trigger execution of the lazy transformations performed on this dataset.

Time complexity: O(1) unless conversion is required.


A list of remote PyArrow tables created from this dataset.

DeveloperAPI: This API may change across minor Ray releases.