Skip to content

innovate.export_ipc_file

All current Python definitions

View source · Source file SHA-256: 522871fe0b61b840b5f85b8f278beb2b79c7afd68645265ae3a68983d56d74e4

def export_ipc_file(data: pl.DataFrame | pl.LazyFrame | bytes) -> bytes: ...

Re-encode a table or Arrow IPC input as interoperable IPC file bytes.

The native writer preserves compatible field annotations and schema metadata from IPC input. Materialized Polars tables can only supply metadata still represented in that table. This conversion copies and re-encodes buffers.

  • data: Polars DataFrame, LazyFrame, or complete IPC file/stream bytes. Lazy input is collected before serialization.

IPC file bytes containing the table schema and record batches.

  • TypeError: If data is neither bytes nor a supported Polars frame.
  • ValueError: If native IPC reading or writing fails.
  • polars.exceptions.PolarsError: If collection or initial serialization fails.