Skip to content

LazyFrame.to_arrow

to_arrow

to_arrow(batch_size: Literal[None]) -> pa.Table
to_arrow(batch_size: int) -> pa.RecordBatch
to_arrow(
    batch_size: int | None = None,
) -> Union[pa.Table, pa.RecordBatch]

Convert the relation to an Arrow Table or RecordBatch.

Parameters:

Name Type Description Default
batch_size int | None

The size of each RecordBatch. If None, returns an Arrow Table.

None

Returns:

Type Description
Union[Table, RecordBatch]

pa.Table or pa.RecordBatch: The Arrow representation of the data.