Skip to content

Commit c2ea5d5

Browse files
author
Brendan Herger
committed
Updating categorical imputer tests to reference new methods
1 parent 6339ccd commit c2ea5d5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

sklearn_pandas/categorical_imputer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class CategoricalImputer(BaseEstimator, TransformerMixin):
4141
- If "constant", then replace missing values with fill_value. Can be
4242
used with strings or numeric data.
4343
44-
replacement : string, optional (default='?')
44+
fill_value : string, optional (default='?')
4545
The value that all instances of `missing_values` are replaced
4646
with if `strategy` is set to `constant`. This is useful if
4747
you don't want to impute with the mode, or if there are multiple

tests/test_categorical_imputer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def test_custom_replacement(replacement_value, input_type):
147147
Xc = X.copy()
148148

149149
Xt = CategoricalImputer(
150-
strategy='fixed_value',
150+
strategy='constant',
151151
fill_value=replacement_value
152152
).fit_transform(X)
153153

@@ -158,10 +158,10 @@ def test_custom_replacement(replacement_value, input_type):
158158

159159
def test_missing_replacement():
160160
"""
161-
Raise error if no replacement value specified and strategy='fixed_value'
161+
Raise error if no replacement value specified and strategy='constant'
162162
"""
163163
with pytest.raises(ValueError):
164-
CategoricalImputer(strategy="fixed_value")
164+
CategoricalImputer(strategy="constant")
165165

166166

167167
def test_invalid_strategy():

0 commit comments

Comments
 (0)