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

Class ParquetFile

python/pyarrow/parquet/core.py:208–711  ·  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 True
240 Coalesce and issue file reads in parallel to improve performance on
241 high-latency filesystems (e.g. S3, GCS). If True, Arrow will use a
242 background I/O thread pool. If using a filesystem layer that itself
243 performs readahead (e.g. fsspec's S3FS), disable readahead for best
244 results. Set to False if you want to prioritize minimal memory usage
245 over maximum speed.
246 coerce_int96_timestamp_unit : str, default None
247 Cast timestamps that are stored in INT96 format to a particular
248 resolution (e.g. 'ms'). Setting to None is equivalent to 'ns'
249 and therefore INT96 timestamps will be inferred as timestamps
250 in nanoseconds.
251 decryption_properties : FileDecryptionProperties, default None
252 File decryption properties for Parquet Modular Encryption.
253 thrift_string_size_limit : int, default None
254 If not None, override the maximum total string size allocated
255 when decoding Thrift structures. The default limit should be
256 sufficient for most Parquet files.
257 thrift_container_size_limit : int, default None
258 If not None, override the maximum total size of containers allocated
259 when decoding Thrift structures. The default limit should be
260 sufficient for most Parquet files.
261 filesystem : FileSystem, default None
262 If nothing passed, will be inferred based on path.
263 Path will try to be found in the local on-disk filesystem otherwise
264 it will be parsed as an URI to determine the filesystem.
265 page_checksum_verification : bool, default False

Callers 3

read_tableFunction · 0.85
read_metadataFunction · 0.85
read_schemaFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected