pandera.engines.narwhals_engine.Engine

class pandera.engines.narwhals_engine.Engine[source]

Narwhals data type engine.

Methods

classmethod dtype(data_type)[source]

Convert input into a Narwhals-compatible Pandera DataType object.

If data_type is an engine-specific dtype from another backend (e.g. polars_engine.Int64), the method falls back to the shared abstract pandera base class (e.g. dtypes.Int64) so cross-engine dtype comparisons work without importing the foreign engine.

Return type:

DataType