lamindb.base.dtypes¶
Dtype utils.
- lamindb.base.dtypes.check_dtype(expected_type, nullable)¶
Creates a check function for Pandera that validates a column’s dtype.
Supports both standard dtype checking and mixed list/single values for the same type. For example, a column with expected_type ‘float’ would also accept a mix of float values and lists of floats.
- Parameters:
expected_type (
Any) – String identifier for the expected type (‘int’, ‘float’, ‘num’, ‘str’)- Return type:
Callable- Returns:
A function that checks if a series has the expected dtype or contains mixed types