pyarrow.record_batch

pyarrow.record_batch(data, names=None, schema=None, metadata=None)

Create a pyarrow.RecordBatch from another Python data structure or sequence of arrays.

Parameters
datapandas.DataFrame, list

A DataFrame or list of arrays or chunked arrays.

nameslist, default None

Column names if list of arrays passed as data. Mutually exclusive with ‘schema’ argument.

schemaSchema, default None

The expected schema of the RecordBatch. If not passed, will be inferred from the data. Mutually exclusive with ‘names’ argument.

metadatadict or Mapping, default None

Optional metadata for the schema (if schema not passed).

Returns
RecordBatch