Add narwhals
engine as dataframe compatibility layer to support multiple engine at once
#1894
Labels
enhancement
New feature or request
Current status: feature set differs per engine
Pandera supports different engines, including pandas, polars, modin, Dask and pyspark. Feature completeness differs between these engines, most notably support for pydantic v2 (see #1874 and beda-software/FHIRPathMappingLanguage#18).
Narwhals aims to address this issue by providing a lightweight and extensible compatibility layer between dataframe libraries. It has gained traction and Python projects, as for example Altair, have recently removed the dependency from pandas and integrated Narwhals instead.
Desired situation: more complete feature set across engines
While this issue was triggers by #1874, I see a larger benefit by implementing Narhwals to support multiple dataframe libraries at once. Provided that the Narwhals API provides the functionality required by pandera (I have done a quick check and haven't spotted a blocking issue yet; no guarantees though, since I am quite new to pandera).
Alternatie situation: implement
PydanticModel
for polarspandas_engine.PydanticModel
intopolars_engine
in case Narwhals doesn't support the functionality needed by pandera.The text was updated successfully, but these errors were encountered: