tiledbsoma.AxisQuery

class tiledbsoma.AxisQuery(*, value_filter: str | None = None, 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[Any, dtype[integer]] | ndarray[Any, dtype[datetime64]]] = ())

Single-axis dataframe query with coordinates and a value filter.

Per dimension, the AxisQuery can have value of:

  • None – all data

  • Coordinates – a set of coordinates on the axis dataframe index, expressed in any type or format supported by DataFrame.read().

  • A SOMA value_filter across columns in the axis dataframe, expressed as string

  • Or, a combination of coordinates and value filter.

Examples:

AxisQuery()  # all data
AxisQuery(coords=())  # also all data
AxisQuery(coords=(slice(1,10),))  # 1D, slice
AxisQuery(coords=([0,1,2]))  # 1D, point indexing using array-like
AxisQuery(coords=(slice(None), numpy.array([0,88,1001])))  # 2D
AxisQuery(value_filter="tissue == 'lung'")
AxisQuery(coords=(slice(1,None),), value_filter="tissue == 'lung'")

Lifecycle: maturing

__init__(*, value_filter: str | None = None, 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[Any, dtype[integer]] | ndarray[Any, dtype[datetime64]]] = ()) None

Method generated by attrs for class AxisQuery.

Methods

__init__(*[, value_filter, coords])

Method generated by attrs for class AxisQuery.

Attributes

value_filter

A string specifying a SOMA value_filter.

coords

Query (slice) by dimension.