File tree Expand file tree Collapse file tree 2 files changed +13
-12
lines changed Expand file tree Collapse file tree 2 files changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -382,13 +382,13 @@ NumericalTransformer takes function name as a string parameter and hence can be
382
382
... ])
383
383
>>> mapper5.fit_transform(data)
384
384
array([[1.38629436],
385
- [1.79175947],
386
- [1.09861229],
387
- [1.09861229],
388
- [0.69314718],
389
- [1.09861229],
390
- [1.60943791],
391
- [1.38629436]])
385
+ [1.79175947],
386
+ [1.09861229],
387
+ [1.09861229],
388
+ [0.69314718],
389
+ [1.09861229],
390
+ [1.60943791],
391
+ [1.38629436]])
392
392
393
393
394
394
Original file line number Diff line number Diff line change 1
1
import numpy as np
2
2
import pandas as pd
3
+ from sklearn .base import TransformerMixin
3
4
4
- from sklearn .base import BaseEstimator , TransformerMixin
5
5
6
6
def _get_mask (X , value ):
7
7
"""
@@ -25,12 +25,13 @@ def __init__(self, func):
25
25
"""
26
26
Params
27
27
28
- func function to apply to input columns. The function will be applied to each value.
29
- Supported functions are defined in SUPPORTED_FUNCTIONS variable. Throws assertion
30
- error if the not supported.
28
+ func function to apply to input columns. The function will be
29
+ applied to each value. Supported functions are defined
30
+ in SUPPORTED_FUNCTIONS variable. Throws assertion error if the
31
+ not supported.
31
32
"""
32
33
assert func in self .SUPPORTED_FUNCTIONS , \
33
- f"Only following func arguments are supported: { self .SUPPORTED_FUNCTIONS } "
34
+ f"Only following func are supported: { self .SUPPORTED_FUNCTIONS } "
34
35
super (NumericalTransformer , self ).__init__ ()
35
36
self .__func = func
36
37
You can’t perform that action at this time.
0 commit comments