Table.to_arrow#
- Table.to_arrow() pyarrow.Table[source]#
Return this table as a
pyarrow.Table.Each row array becomes a column with the same name and dtype.
Requires
pyarrow.- Returns:
pyarrow.TableThis table represented as an Arrow Table.
Notes
1D contiguous numeric columns wrap the underlying VTK buffer zero-copy. Booleans, complex numbers, and strings go through pyvista’s existing VTK conversion and are copied. Arrow buffers are immutable by contract, so consumers cannot mutate VTK memory through the returned table.
Examples
>>> import numpy as np >>> import pyvista as pv >>> table = pv.Table({'a': np.arange(3), 'b': np.array([0.5, 1.5, 2.5])}) >>> table.to_arrow().schema.names ['a', 'b']