pyarrow.ipc.IpcWriteOptions#

class pyarrow.ipc.IpcWriteOptions(metadata_version=MetadataVersion.V5, *, bool allow_64bit=False, use_legacy_format=False, compression=None, bool use_threads=True, bool emit_dictionary_deltas=False, bool unify_dictionaries=False)#

Bases: _Weakrefable

Serialization options for the IPC format.

Parameters:
metadata_versionMetadataVersion, default MetadataVersion.V5

The metadata version to write. V5 is the current and latest, V4 is the pre-1.0 metadata version (with incompatible Union layout).

allow_64bitbool, default False

If true, allow field lengths that don’t fit in a signed 32-bit int.

use_legacy_formatbool, default False

Whether to use the pre-Arrow 0.15 IPC format.

compressionstr, Codec, or None

compression codec to use for record batch buffers. If None then batch buffers will be uncompressed. Must be “lz4”, “zstd” or None. To specify a compression_level use pyarrow.Codec

use_threadsbool

Whether to use the global CPU thread pool to parallelize any computational tasks like compression.

emit_dictionary_deltasbool

Whether to emit dictionary deltas. Default is false for maximum stream compatibility.

unify_dictionariesbool

If true then calls to write_table will attempt to unify dictionaries across all batches in the table. This can help avoid the need for replacement dictionaries (which the file format does not support) but requires computing the unified dictionary and then remapping the indices arrays.

This parameter is ignored when writing to the IPC stream format as the IPC stream format can support replacement dictionaries.

__init__(*args, **kwargs)#

Methods

__init__(*args, **kwargs)

Attributes

allow_64bit

compression

emit_dictionary_deltas

metadata_version

unify_dictionaries

use_legacy_format

use_threads

allow_64bit#
compression#
emit_dictionary_deltas#
metadata_version#
unify_dictionaries#
use_legacy_format#
use_threads#