Skip to content

Migration to Narwhals: Add Polars Support #992

Description

@solegalli

Overview

This is an umbrella issue for the complete migration of feature-engine to use Narwhals, enabling support for Polars dataframes in addition to Pandas.

Scope

The migration involves updating every single transformer in the library to work with Narwhals, ensuring compatibility with both Pandas and Polars backends.

Migration Details

  • Branch: narwhals-migration
  • Strategy: One PR per transformer for focused, reviewable changes
  • Goal: Enable users to use Polars dataframes seamlessly alongside Pandas

Work Items

Each transformer will need to be updated to:

  1. Use Narwhals API for dataframe operations
  2. Maintain backward compatibility with Pandas
  3. Support Polars as an additional backend
  4. Update tests to cover both backends

Expected Outcomes

  • Full Narwhals integration across all transformers
  • Seamless support for both Pandas and Polars dataframes
  • Consistent API experience for users regardless of backend selection

Related

Migration happening in the narwhals-migration branch.


FYI @FBruzzesi

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions