Skip to content

Collection.delete

def Collection.delete(
datapoints: DatapointIDs,
*,
show_progress: bool | Callable[[float], None] = False,
) -> int

Delete data points from the collection.

Data points are identified and deleted by their ids.

datapoints DatapointIDs

Datapoint IDs to delete from the collection.

Supported DatapointIDs types are:

  • A pandas.DataFrame containing an id column.
  • A pandas.Series containing datapoint IDs.
  • An xarray.Dataset containing an “id” variable.
  • An xarray.DataArray containing datapoint IDs.
  • A numpy.ndarray containing datapoint IDs.
  • A Collection[UUID] containing datapoint IDs as python built-in UUID objects, e.g. list[UUID].
  • A Collection[str] containing datapoint IDs as strings, e.g. list[str].
show_progress bool | Callable[[float], None]

If True, display a progress bar while deleting many datapoints. You can also pass a callback to receive progress values between 0 and 1. Defaults to False.

The number of data points that were deleted.

NotFoundError No such collection: Non-existent-Collection

One of the data points is not found in the collection. If any of the data points are not found, nothing will be deleted.

ValueError Invalid UUID

One of the specified ids is not a valid UUID