DataSet.to_arrow#
- DataSet.to_arrow(association: PointLiteral | CellLiteral = 'point') pyarrow.Table[source]#
Return this dataset’s point or cell arrays as a
pyarrow.Table.Thin wrapper around
DataSetAttributes.to_arrow().Requires
pyarrow.- Parameters:
- association
str|pyvista.core.utilities.arrays.FieldAssociation, default: ‘point’ Which attribute set to convert. Accepts
'point'/FieldAssociation.POINTor'cell'/FieldAssociation.CELL.
- association
- Returns:
pyarrow.TableTable with one column per (expanded) array.
Examples#
Download Python source code | Download Jupyter notebook
>>> import pyvista as pv
>>> mesh = pv.Cube()
>>> mesh.clear_data()
>>> mesh.point_data['scalars'] = range(mesh.n_points)
>>> mesh.to_arrow().num_rows
8