datafusion.record_batch

This module provides the classes for handling record batches.

These are typically the result of dataframe datafusion.dataframe.execute_stream() operations.

Classes

RecordBatch

This class is essentially a wrapper for pyarrow.RecordBatch.

RecordBatchStream

This class represents a stream of record batches.

Module Contents

class datafusion.record_batch.RecordBatch(record_batch: datafusion._internal.RecordBatch)

This class is essentially a wrapper for pyarrow.RecordBatch.

This constructor is generally not called by the end user.

See the RecordBatchStream iterator for generating this class.

to_pyarrow() pyarrow.RecordBatch

Convert to pyarrow.RecordBatch.

record_batch
class datafusion.record_batch.RecordBatchStream(record_batch_stream: datafusion._internal.RecordBatchStream)

This class represents a stream of record batches.

These are typically the result of a execute_stream() operation.

This constructor is typically not called by the end user.

__iter__() typing_extensions.Self

Iterator function.

__next__() RecordBatch

Iterator function.

next() RecordBatch | None

See __next__() for the iterator function.

rbs