pyarrow.parquet.read_pandas

pyarrow.parquet.read_pandas(source, columns=None, nthreads=1, metadata=None)[source]

Read a Table from Parquet format, also reading DataFrame index values if known in the file metadata

Parameters:
  • source (str, pyarrow.NativeFile, or file-like object) – If a string passed, can be a single file name or directory name. For file-like objects, only read a single file. Use pyarrow.BufferReader to read a file contained in a bytes or buffer-like object
  • columns (list) – If not None, only these columns will be read from the file. A column name may be a prefix of a nested field, e.g. ‘a’ will select ‘a.b’, ‘a.c’, and ‘a.d.e’
  • nthreads (int, default 1) – Number of columns to read in parallel. Requires that the underlying file source is threadsafe
  • metadata (FileMetaData) – If separately computed
Returns:

pyarrow.Table – Content of the file as a Table of Columns, including DataFrame indexes as columns