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
  • data (pandas.DataFrame, dict, list) – A DataFrame, mapping of strings to Arrays or Python lists, 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 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).

  • metadata (dict or Mapping, default None) – Optional metadata for the schema (if schema not passed).

  • nthreads (int, default None (may use up to system CPU count threads)) – For pandas.DataFrame inputs: if greater than 1, convert columns to Arrow in parallel using indicated number of threads.

Returns

Table