pyvista.DataSetAttributes.remove#

DataSetAttributes.remove(key: str) None[source]#

Remove an array.

Parameters:
keystr

The name of the array to remove.

Notes

You can also use the del statement.

Examples

Add a point data array to a DataSet and then remove it.

>>> import pyvista as pv
>>> mesh = pv.Cube()
>>> mesh.point_data['my_data'] = range(mesh.n_points)
>>> mesh.point_data.remove('my_data')

Show that the array no longer exists in point_data.

>>> 'my_data' in mesh.point_data
False