_: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:
- Add a deprecation warning to this class, similar to the one added to
CommonPandasDataset.
- Create a new
ImputationPolarsDataset class that uses Polars operations instead of Pandas.
- 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)
Consider creating a Polars-based version of
ImputationPandasDatasetThe renaming of
ImputationDatasettoImputationPandasDatasetis consistent with other Pandas-based classes. However, to complete the transition to Polars and maintain consistency across the codebase, consider the following suggestions:CommonPandasDataset.ImputationPolarsDatasetclass that uses Polars operations instead of Pandas.ampute_datafunction to work with Polars DataFrames, or create a Polars-compatible version.Example deprecation warning:
Originally posted by @coderabbitai[bot] in #155 (comment)