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
data (pandas.DataFrame, list) – A DataFrame or list of arrays or chunked arrays.
names (list, default None) – Column names if list of arrays passed as data. Mutually exclusive with ‘schema’ argument.
schema (Schema, default None) – The expected schema of the RecordBatch. If not passed, will be inferred from the data. Mutually exclusive with ‘names’ argument.
metadata (dict or Mapping, default None) – Optional metadata for the schema (if schema not passed).
- Returns
RecordBatch