tiledbsoma.PointCloudDataFrame.delete_cells

PointCloudDataFrame.delete_cells(coords: Sequence[None | bytes | Slice[bytes] | Sequence[bytes] | float | Slice[float] | Sequence[float] | int | Slice[int] | Sequence[int] | slice | Slice[slice] | Sequence[slice] | str | Slice[str] | Sequence[str] | datetime64 | Slice[datetime64] | Sequence[datetime64] | TimestampType | Slice[TimestampType] | Sequence[TimestampType] | Array | ChunkedArray | ndarray[tuple[Any, ...], dtype[integer]] | ndarray[tuple[Any, ...], dtype[datetime64]]] = (), *, value_filter: str | None = None, platform_config: Dict[str, Mapping[str, Any]] | object | None = None) None

Deletes cells at the specified coordinates.

Either coords or value_filter must be provided. When both coords and value_filter are provided, the cells that match both constraints will be removed.

Examples: * Delete all values not in a tissue:

>>> with tiledbsoma.PointCloudDataFrame(loc_uri, mode="d") as loc:
...     loc.delete_cells(value_filter="in_tissue == 0")
  • Delete a sequence of soma_joinid values from a two-dimensional point cloud:
    >>> with tiledbsoma.PointCloudDataFrame(loc_uri, mode="d") as loc:
    ...     loc.delete_cells((slice(None, None), slice(None, None), (12001, 12003, 12004, 12007)))
    
  • Delete points from region x > 3000, y > 3000 and ``array_row == 1”
    >>> with tiledbsoma.PointCloudDataFrame(loc_uri, mode="d") as loc:
    ...     loc.delete_cells((slice(3000, None), slice(3000, None)), value_filter="array_row == 1")
    

Note: Deleting cells does not change the current domain or possible enumeration values.

Parameters:
  • coords – A per-dimension Sequence of scalar, slice, sequence of scalar or Arrow IntegerArray <https://arrow.apache.org/docs/python/generated/pyarrow.IntegerArray.html> values defining the region to read.

  • value_filter – An optional [value filter] to apply to the results. Defaults to no filter.