lamindb.base.types.Dtype

lamindb.base.types.Dtype

Data type.

Data types in lamindb are a string-serialized abstraction of common data types.

Overview

description

lamindb

pandas

categorical

"cat"

category

numerical

"num"

int | float

integer

"int"

int64 | int32 | int16 | int8 | uint | ...

float

"float"

float64 | float32 | float16 | float8 | ...

string

"str"

object

datetime

"datetime"

datetime

date

"date"

date

Categoricals

Beyond indicating that a feature is a categorical, lamindb allows you to define the registry to which values are restricted.

For example, 'cat[ULabel]' or 'cat[bionty.CellType]' indicate that permissible values are from the ULabel or CellType registry, respectively.

You can also reference multiple registries, e.g., 'cat[ULabel|bionty.CellType]' indicates that values can be from either registry.

You can also restrict to sub-types defined in registries via the type column, e.g., 'cat[ULabel[CellMedium]]' indicates that values must be of type CellMedium within the ULabel registry.

Literal

A Dtype object in lamindb is a Literal up to further specification of "cat".

alias of Literal[‘cat’, ‘num’, ‘str’, ‘int’, ‘float’, ‘bool’, ‘date’, ‘datetime’, ‘object’]