> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tilebox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Collection.delete

```python theme={"system"}
def Collection.delete(datapoints: DatapointIDs) -> int
```

Delete data points from the collection.

Data points are identified and deleted by their ids.

<Note>
  You need to have write permission on the collection to be able to delete data points.
</Note>

## Parameters

<ParamField path="datapoints" type="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]`.
</ParamField>

## Returns

The number of data points that were deleted.

<RequestExample>
  ```python Python theme={"system"}
  collection.delete([
    "0195c87a-49f6-5ffa-e3cb-92215d057ea6",
    "0195c87b-bd0e-3998-05cf-af6538f34957",
  ])
  ```
</RequestExample>

## Errors

<ParamField path="NotFoundError" type="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.
</ParamField>

<ParamField path="ValueError" type="Invalid UUID">
  One of the specified ids is not a valid UUID
</ParamField>
