Skip to content

Commit

Permalink
fix error for text missing values in test fold (#253)
Browse files Browse the repository at this point in the history
  • Loading branch information
pplonski committed Nov 27, 2020
1 parent 6abf58d commit c2d8ccd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion supervised/preprocessing/preprocessing_missing.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,12 @@ def _get_fill_value(self, x):
PreprocessingMissingValues.MISSING_VALUE
) # add new categorical value
return PreprocessingUtils.get_most_frequent(x)

# datetime
if PreprocessingUtils.get_type(x) == PreprocessingUtils.DATETIME:
return PreprocessingUtils.get_most_frequent(x)
# text
if PreprocessingUtils.get_type(x) == PreprocessingUtils.TEXT:
return PreprocessingMissingValues.MISSING_VALUE

# numerical type
if self._na_fill_method == PreprocessingMissingValues.FILL_NA_MIN:
Expand Down

0 comments on commit c2d8ccd

Please sign in to comment.