lamindb.base.types.Dtype¶
- lamindb.base.types.Dtype¶
Data type.
String-serialized representations of common data types.
Overview¶
description
lamindb
pandas
categorical
"cat"categorynumerical
"num"int | floatinteger
"int"int64 | int32 | int16 | int8 | uint | ...float
"float"float64 | float32 | float16 | float8 | ...string
"str"objectdatetime
"datetime"datetimedate
"date"object(pandera requires an ISO-format string, convert withdf["date"] = df["date"].dt.date)dictionary
"dict"objectpath
"path"str(pandas does not have a dedicated path type, validated asstr)Categoricals¶
Beyond indicating that a feature is a categorical,
lamindballows you to define the registry to which values are restricted.For example,
'cat[ULabel]'or'cat[bionty.CellType]'indicate that permissible values are from theULabelorCellTyperegistry, 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
typecolumn, e.g.,'cat[ULabel[CellMedium]]'indicates that values must be of typeCellMediumwithin theULabelregistry.Literal¶
A
Dtypeobject inlamindbis aLiteralup to further specification of"cat".alias of
Literal[‘cat’, ‘num’, ‘str’, ‘int’, ‘float’, ‘bool’, ‘date’, ‘datetime’, ‘dict’, ‘object’, ‘path’]