---
title: "Collection.delete"
description: "Delete data points from the collection."
image: "https://tilebox.com/images/tilebox-docs-social-preview.png"
---

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

# Collection.delete

import { Fragment } from "astro/jsx-runtime";

import ApiReference from "@docs/components/ApiReference.astro";

import ParamField from "@docs/components/ParamField.astro";

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

:::note
You need to have write permission on the collection to be able to delete data points.
:::

## Parameters

**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]`.

**show_progress**

type: 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`.

## Returns

The number of data points that were deleted.

## Errors

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

type: Invalid UUID

One of the specified ids is not a valid UUID

<h2 id="request-example">Usage example</h2>

```python
collection.delete(
    [
        "0195c87a-49f6-5ffa-e3cb-92215d057ea6",
        "0195c87b-bd0e-3998-05cf-af6538f34957",
    ]
)
```

Source: https://tilebox.com/docs/api-reference/python/tilebox.datasets/Collection.delete/index.mdx
