pandera.backends.narwhals.container.DataFrameSchemaBackendΒΆ

class pandera.backends.narwhals.container.DataFrameSchemaBackend[source]ΒΆ

Methods

check_column_presence(check_obj, schema, column_info)[source]ΒΆ

Check that all columns in the schema are present in the dataframe.

Return type:

list[CoreCheckResult]

check_column_values_are_unique(check_obj, schema)[source]ΒΆ

Check that column values are unique.

Return type:

CoreCheckResult

coerce_dtype(check_obj, schema)[source]ΒΆ

Coerce dataframe to schema.dtype for row-wise dtypes (e.g. PydanticModel).

Column-level dtypes are handled via schema components; this method only acts when schema.dtype.auto_coerce is True (i.e. the dtype applies row-wise and handles its own coercion over the whole frame).

collect_column_info(check_obj, schema)[source]ΒΆ

Collect column metadata for the dataframe.

collect_schema_components(check_obj, schema, column_info)[source]ΒΆ

Collects all schema components to use for validation.

run_checks(check_obj, schema)[source]ΒΆ

Run a list of checks on the check object.

Return type:

list[CoreCheckResult]

run_schema_component_checks(check_obj, schema, schema_components, lazy)[source]ΒΆ

Run checks for all schema components.

Return type:

list[CoreCheckResult]

strict_filter_columns(check_obj, schema, column_info)[source]ΒΆ

Filter columns that aren’t specified in the schema.

validate(check_obj, schema, *, head=None, tail=None, sample=None, random_state=None, lazy=False, inplace=False)[source]ΒΆ

Parse and validate a check object, returning type-coerced and validated object.