How Narwhals and scikit-lego came together to achieve dataframe-agnosticism
Briefly

Recently, because Polars has been gaining traction, the library maintainers have been looking for a simple way to support multiple dataframe implementations... As of scikit-lego 0.9.0, you can also pass dataframes from Polars, Modin, cuDF, and in principle a whole host of other dataframes.
In order to address all the above, scikit-lego opted for a simpler approach: use Narwhals. The steps then become: run narwhals.from_native on the input, if it's NumPy, then perform array operations, otherwise, express dataframe logic using the subset of the Polar.
Read at Quansight
[
add
]
[
|
|
]