-
Notifications
You must be signed in to change notification settings - Fork 24
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
Remove unnecessary OneHotEncoder
when there are nan values
#725
Conversation
Codecov ReportAll modified lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #725 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 17 17
Lines 1805 1805
=========================================
Hits 1805 1805
☔ View full report in Codecov by Sentry. |
# Run | ||
ohe.fit(data, 'column_name') | ||
# Create a temporary file and dump the transformer | ||
tmp = tempfile.NamedTemporaryFile() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use the pytest tmp_path
fixutre instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just one last small nitpick
tmp = tmp_path / 'ohe.pkl' | ||
with open(tmp, 'wb') as tmp: | ||
pickle.dump(ohe, tmp) | ||
with open(tmp.name, 'rb') as tmp: | ||
ohe_loaded = pickle.load(tmp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: can we use different var names for the filepath and the file?
Resolve #616.