pyvista.Table

class Table(*args, **kwargs)

Wrapper for the vtkTable class.

Create by passing a 2D NumPy array of shape (n_rows by n_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.

Table.clear_field_arrays()

Remove all field data.

Table.clear_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.

Table.items()

Return the table items.

Table.keys()

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.

Table.to_pandas()

Create a Pandas DataFrame from this Table.

Table.update(data)

Set the table data using a dict-like update.

Table.values()

Return the table values.

Attributes

Table.actual_memory_size

Return the actual size of the dataset object.

Table.field_arrays

Return vtkFieldData as DataSetAttributes.

Table.field_data

Return FieldData as DataSetAttributes.

Table.memory_address

Get address of the underlying VTK C++ object.

Table.n_arrays

Return the number of columns.

Table.n_columns

Return the number of columns.

Table.n_rows

Return the number of rows.

Table.row_arrays

Return the all row arrays.