MCPcopy Create free account
hub / github.com/apache/arrow / ParquetFile

Class ParquetFile

python/pyarrow/parquet/core.py:208–708  ·  view source on GitHub ↗

Reader interface for a single Parquet file. Parameters ---------- source : str, pathlib.Path, pyarrow.NativeFile, or file-like object Readable source. For passing bytes or buffer-like file containing a Parquet file, use pyarrow.BufferReader. metadata : FileMetaD

Source from the content-addressed store, hash-verified

206
207
208class ParquetFile:
209 """
210 Reader interface for a single Parquet file.
211
212 Parameters
213 ----------
214 source : str, pathlib.Path, pyarrow.NativeFile, or file-like object
215 Readable source. For passing bytes or buffer-like file containing a
216 Parquet file, use pyarrow.BufferReader.
217 metadata : FileMetaData, default None
218 Use existing metadata object, rather than reading from file.
219 common_metadata : FileMetaData, default None
220 Will be used in reads for pandas schema metadata if not found in the
221 main file's metadata, no other uses at the moment.
222 read_dictionary : list
223 List of column names to read directly as DictionaryArray.
224 binary_type : pyarrow.DataType, default None
225 If given, Parquet binary columns will be read as this datatype.
226 This setting is ignored if a serialized Arrow schema is found in
227 the Parquet metadata.
228 list_type : subclass of pyarrow.DataType, default None
229 If given, non-MAP repeated columns will be read as an instance of
230 this datatype (either pyarrow.ListType or pyarrow.LargeListType).
231 This setting is ignored if a serialized Arrow schema is found in
232 the Parquet metadata.
233 memory_map : bool, default False
234 If the source is a file path, use a memory map to read file, which can
235 improve performance in some environments.
236 buffer_size : int, default 0
237 If positive, perform read buffering when deserializing individual
238 column chunks. Otherwise IO calls are unbuffered.
239 pre_buffer : bool, default False
240 Coalesce and issue file reads in parallel to improve performance on
241 high-latency filesystems (e.g. S3). If True, Arrow will use a
242 background I/O thread pool.
243 coerce_int96_timestamp_unit : str, default None
244 Cast timestamps that are stored in INT96 format to a particular
245 resolution (e.g. 'ms'). Setting to None is equivalent to 'ns'
246 and therefore INT96 timestamps will be inferred as timestamps
247 in nanoseconds.
248 decryption_properties : FileDecryptionProperties, default None
249 File decryption properties for Parquet Modular Encryption.
250 thrift_string_size_limit : int, default None
251 If not None, override the maximum total string size allocated
252 when decoding Thrift structures. The default limit should be
253 sufficient for most Parquet files.
254 thrift_container_size_limit : int, default None
255 If not None, override the maximum total size of containers allocated
256 when decoding Thrift structures. The default limit should be
257 sufficient for most Parquet files.
258 filesystem : FileSystem, default None
259 If nothing passed, will be inferred based on path.
260 Path will try to be found in the local on-disk filesystem otherwise
261 it will be parsed as an URI to determine the filesystem.
262 page_checksum_verification : bool, default False
263 If True, verify the checksum for each page read from the file.
264 arrow_extensions_enabled : bool, default True
265 If True, read Parquet logical types as Arrow extension types where possible,

Callers 3

read_tableFunction · 0.85
read_metadataFunction · 0.85
read_schemaFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected