pyvista.Table#
- class Table(*args, **kwargs)[source]#
Wrapper for the
vtkTable
class.Create by passing a 2D NumPy array of shape (
n_rows
byn_columns
) or from a dictionary containing NumPy arrays.Examples
>>> import pyvista as pv >>> import numpy as np >>> arrays = np.random.rand(100, 3) >>> table = pv.Table(arrays)
Methods
Table.add_field_array
(scalars, name[, deep])Add field data.
Table.add_field_data
(array, name[, deep])Add field data.
Remove all field data.
Remove all field data.
Table.copy
([deep])Return a copy of the object.
Table.copy_attributes
(dataset)Copy the data attributes of the input dataset object.
Table.copy_meta_from
(ido)Copy pyvista meta data onto this object from another object.
Table.copy_structure
(dataset)Copy the structure (geometry and topology) of the input dataset object.
Table.deep_copy
(to_copy)Overwrite this data object with another data object as a deep copy.
Table.get
(index)Get an array by its name.
Table.get_data_range
([arr, preference])Get the non-NaN min and max of a named array.
Table.head
([display, html])Return the header stats of this dataset.
Return the table items.
Return the table keys.
Table.pop
(name)Pop off an array by the specified name.
Table.save
(*args, **kwargs)Save the table.
Table.shallow_copy
(to_copy)Shallow copy the given mesh to this mesh.
Create a Pandas DataFrame from this Table.
Table.update
(data)Set the table data using a dict-like update.
Return the table values.
Attributes
Return the actual size of the dataset object.
Return vtkFieldData as DataSetAttributes.
Return FieldData as DataSetAttributes.
Get address of the underlying VTK C++ object.
Return the number of columns.
Return the number of columns.
Return the number of rows.
Return the all row arrays.