lamindb.core.InspectResult

class lamindb.core.InspectResult(validated_df, validated, nonvalidated, frac_validated, n_empty, n_unique)

Bases: object

Result of inspect.

An InspectResult object of calls such as inspect().

Attributes

property df: DataFrame

A DataFrame indexed by values with a boolean __validated__ column.

property frac_validated: float

Fraction of items that were validated.

property n_empty: int

Number of empty items.

property n_unique: int

Number of unique items.

property non_validated: list[str]

List of unsuccessfully validate() items.

This list can be used to remove any non-validated values such as genes that do not map against the specified source.

property synonyms_mapper: dict

Synonyms mapper dictionary.

Such a dictionary maps the actual values to their synonyms which can be used to rename values accordingly.

Examples

>>> markers = pd.DataFrame(index=["KI67","CCR7"])
>>> synonyms_mapper = bt.CellMarker.standardize(markers.index, return_mapper=True)

{‘KI67’: ‘Ki67’, ‘CCR7’: ‘Ccr7’}

property validated: list[str]

List of successfully validate() validated items.