pyvista.Table#

class Table(*args, **kwargs)[source]#

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.default_rng().random((100, 3))
>>> table = pv.Table(arrays)

Methods

Table.get(index)

Get an array by its name.

Table.get_data_range([arr, preference])

Get the min and max of a named array.

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