Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update NonValueTransformer's Default Setting and Handle Custom Fill Values #199

Merged
merged 4 commits into from
Jul 11, 2024

Conversation

MooooCat
Copy link
Contributor

@MooooCat MooooCat commented Jul 11, 2024

Description

The changes involve updating the NonValueTransformer class within the sdgx/data_processors/transformers/nan.py file. Specifically, the drop_na attribute is updated to default to False, indicating that rows with missing values will not be dropped by default. Additionally, a new functionality is introduced to handle a custom fill_na_value passed through kwargs during the fit method. This value must be of type str, and if not, a ValueError is raised.

Motivation and Context

This change is required to enhance the flexibility of the NonValueTransformer class. By allowing users to specify a custom fill value for missing data, the transformer becomes more versatile and useful in scenarios where specific string values are preferred for filling missing data rather than dropping rows.

How has this been tested?

The changes have been tested by running unit tests that cover the fit and convert methods of the NonValueTransformer class.

Types of changes

  • Maintenance (no change in code, maintain the project's CI, docs, etc.)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@MooooCat MooooCat merged commit 3998cd8 into main Jul 11, 2024
12 checks passed
@MooooCat MooooCat deleted the bugfix-change-nan-processor-default-setting branch July 11, 2024 05:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant