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

RDT NullTransformer doesn't replace nulls if missing_value_generation is None #658

Closed
amontanez24 opened this issue Jun 23, 2023 · 0 comments · Fixed by #659
Closed

RDT NullTransformer doesn't replace nulls if missing_value_generation is None #658

amontanez24 opened this issue Jun 23, 2023 · 0 comments · Fixed by #659
Assignees
Labels
bug Something isn't working
Milestone

Comments

@amontanez24
Copy link
Contributor

Environment Details

Please indicate the following details about the environment in which you found the bug:

  • RDT version: 1.5.0
  • Python version: Any
  • Operating System: Any

Error Description

When setting the missing_value_generation to None and the missing_value_replacement to 'mean', I would expect the forward transform to impute the nans with the mean value. Instead it currently does nothing. This is because of the following line:

if self._missing_value_generation is None:

Steps to reproduce

data = pd.Series([1, 2, np.nan, 3])
nt = NullTransformer(missing_value_replacement='mean', missing_value_generation=None)
nt.fit(data)
nt.transform(data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant