Skip to content

creating a Polars-based version of ImputationPandasDataset #157

@rvandewater

Description

@rvandewater
          _:hammer_and_wrench: Refactor suggestion_

Consider creating a Polars-based version of ImputationPandasDataset

The renaming of ImputationDataset to ImputationPandasDataset is consistent with other Pandas-based classes. However, to complete the transition to Polars and maintain consistency across the codebase, consider the following suggestions:

  1. Add a deprecation warning to this class, similar to the one added to CommonPandasDataset.
  2. Create a new ImputationPolarsDataset class that uses Polars operations instead of Pandas.
  3. Update the ampute_data function to work with Polars DataFrames, or create a Polars-compatible version.

Example deprecation warning:

@gin.configurable("ImputationPandasDataset")
class ImputationPandasDataset(CommonPandasDataset):
    def __init__(self, *args, **kwargs):
        warnings.warn("ImputationPandasDataset is deprecated. Use ImputationPolarsDataset instead.", DeprecationWarning, stacklevel=2)
        super().__init__(*args, **kwargs)
        # ... rest of the __init__ method ...

Originally posted by @coderabbitai[bot] in #155 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions