DataSet.to_arrow

Contents

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:
associationstr | pyvista.core.utilities.arrays.FieldAssociation, default: ‘point’

Which attribute set to convert. Accepts 'point' / FieldAssociation.POINT or 'cell' / FieldAssociation.CELL.

Returns:
pyarrow.Table

Table with one column per (expanded) array.

Examples

>>> import pyvista as pv
>>> mesh = pv.Cube()
>>> mesh.clear_data()
>>> mesh.point_data['scalars'] = range(mesh.n_points)
>>> mesh.to_arrow().num_rows
8