cellarr_frame package¶
Submodules¶
cellarr_frame.base module¶
- class cellarr_frame.base.CellArrayBaseFrame(uri=None, tiledb_array_obj=None, mode=None, config_or_context=None, validate=True)[source]¶
Bases:
ABCAbstract base class for TileDB DataFrame operations.
- __abstractmethods__ = frozenset({'_read_query', '_read_slice', 'write_batch'})¶
- __getitem__(key)[source]¶
Route slicing/querying to implementation.
Note that strings passed with square bracket notation e.g. A[“cell001”] are assumed to be queries. If you want to select a row using string indices, use a list of strings e.g. A[[“cell001”]].
- __init__(uri=None, tiledb_array_obj=None, mode=None, config_or_context=None, validate=True)[source]¶
Initialize the object.
- Parameters:
uri (
Optional[str]) – URI to the array. Required if ‘tiledb_array_obj’ is not provided.tiledb_array_obj (
Optional[Array]) – Optional, an already opened tiledb object.mode (
Optional[Literal['r','w','d','m']]) – Open mode (‘r’, ‘w’, ‘d’, ‘m’). Defaults to None (auto).config_or_context (
Union[Config,Ctx,None]) – TileDB Config or Ctx.validate (
bool) – Whether to validate the connection.
- property index: DataFrame¶
Get index of the dataframe.
cellarr_frame.frame module¶
- class cellarr_frame.frame.CellArrayFrame(uri=None, tiledb_array_obj=None, mode=None, config_or_context=None, validate=True)[source]¶
Bases:
CellArrayBaseFrameImplementation for TileDB DataFrames.
- __abstractmethods__ = frozenset({})¶
- __annotations__ = {}¶
- classmethod create(uri, data, index_dims=None, full_domain=True, **kwargs)[source]¶
Helper to create a new CellFrame from a dataframe.
- Parameters:
uri (
str) – Path to create array.data (
DataFrame) – Initial dataframe (can be empty schema if used with mode=’schema_only’).index_dims (
Optional[List[str]]) – Columns to use as dimensions (indices).full_domain (
bool) – Whether to allow the domain to extend to the full range of the dtype (default True).