Skip to content

innovate.export_ipc_stream

All current Python definitions

View source · Source file SHA-256: 522871fe0b61b840b5f85b8f278beb2b79c7afd68645265ae3a68983d56d74e4

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

Re-encode a table or Arrow IPC input as an IPC stream with schema metadata.

  • data: Polars DataFrame, LazyFrame, or complete IPC file/stream bytes. Lazy input is collected, and IPC conversion copies buffers.

IPC stream bytes carrying the schema and record batches. Existing IPC schema metadata and compatible field annotations are retained by the native writer; metadata already lost in a Polars table is not reconstructed.

  • 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.