Skip to content

Commit

Permalink
disable combine_min_nan_groups check
Browse files Browse the repository at this point in the history
combine_min_nan_groups is set to True by default but not min_group_size
leading to an exception
maybe change combine_min_nan_groups to False by default in the future?
  • Loading branch information
pyrrhull committed Jul 15, 2020
1 parent 1c94c22 commit cafd264
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions category_encoders/count.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,14 +373,16 @@ def _check_set_create_attrs(self):
"'combine_min_nan_groups' == 'force' for all columns."
)


if (
self.combine_min_nan_groups is not None
and self.min_group_size is None
):
raise ValueError(
"`combine_min_nan_groups` only works when `min_group_size` "
"is set for all columns."
)
pass
# raise ValueError(
# "`combine_min_nan_groups` only works when `min_group_size` "
# "is set for all columns."
# )

if (
self.min_group_name is not None
Expand All @@ -393,7 +395,6 @@ def _check_set_create_attrs(self):

if self.combine_min_nan_groups is None:
self.combine_min_nan_groups = True
# test_count.py failing: self.min_group_size = 0.01

def _check_set_create_dict_attrs(self):
"""Check attributes that can be dicts and format for all `self.cols`."""
Expand Down

0 comments on commit cafd264

Please sign in to comment.