Skip to content

Commit 4dea90c

Browse files
authored
reword unseen, missing and ignore format (#609)
* update unseen and ignore format docstrings * update missing values docstrings
1 parent 6adef90 commit 4dea90c

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

feature_engine/_docstrings/init_parameters/all_trasnformers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
""".rstrip()
1818

1919
_missing_values_docstring = """missing_values: string, default='raise'
20-
Indicates if missing values should be ignored or raised. If 'raise' the
20+
Indicates if missing values should be ignored or raised. If `'raise'` the
2121
transformer will return an error if the the datasets to `fit` or `transform`
22-
contain missing values. If 'ignore', missing data will be ignored when learning
23-
parameters or performing the transformation.
22+
contain missing values. If `'ignore'`, missing data will be ignored when
23+
learning parameters or performing the transformation.
2424
""".rstrip()

feature_engine/_docstrings/init_parameters/encoders.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@
22
This transformer operates only on variables of type object or categorical. To
33
override this behaviour and allow the transformer to transform numerical
44
variables as well, set to `True`.\n
5-
If `ignore_format` is False, the encoder will automatically select variables of
6-
type object or categorical, or check that the variables entered by the user are
7-
of type object or categorical. If True, the encoder will select all variables
8-
or accept all variables entered by the user, including those cast as numeric.
5+
If `ignore_format` is `False`, the encoder will automatically select variables
6+
of type object or categorical, or check that the variables entered by the user
7+
are of type object or categorical. If `True`, the encoder will select all
8+
variables or accept all variables entered by the user, including those cast as
9+
numeric.\n
10+
In short, set to `True` when you want to encode numerical variables.
911
""".rstrip()
12+
1013
_unseen_docstring = """unseen: string, default='ignore'
1114
Indicates what to do when categories not present in the train set are
12-
encountered during transform. If 'raise', then unseen categories will raise an
13-
error. If 'ignore', then unseen categories will be set as NaN and a warning will
14-
be raised instead.
15+
encountered during transform. If `'raise'`, then unseen categories will raise
16+
an error. If `'ignore'`, then unseen categories will be encoded as NaN and a
17+
warning will be raised instead.
1518
""".rstrip()

0 commit comments

Comments
 (0)