pyarrow.table

pyarrow.table(data, names=None, schema=None, metadata=None, nthreads=None)

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

Parameters
datapandas.DataFrame, dict, list

A DataFrame, mapping of strings to Arrays or Python lists, 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 Arrow Table. If not passed, will be inferred from the data. Mutually exclusive with ‘names’ argument. If passed, the output will have exactly this schema (raising an error when columns are not found in the data and ignoring additional data not specified in the schema, when data is a dict or DataFrame).

metadatadict or Mapping, default None

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

nthreadsint, default None

For pandas.DataFrame inputs: if greater than 1, convert columns to Arrow in parallel using indicated number of threads. By default, this follows pyarrow.cpu_count() (may use up to system CPU count threads).

Returns
Table