In [239]: SI=SimpleImputer(verbose=1)
In [240]: SI.fit_transform(X)
/usr/local/lib/python3.6/dist-packages/sklearn/impute/_base.py:403: UserWarning: Deleting features without observed values: [5]
"observed values: %s" % missing)
Out[240]:
array([[ 2., 3., 6., 5., 4.],
[ 2., 3., 6., 15., 4.]])
настройка X:
In [241]: X = np.array([[2,3,6,5,4, np.nan],[2,3,6,15,np.nan, 4]])
In [242]: SI.fit_transform(X)
Out[242]:
array([[ 2., 3., 6., 5., 4., 4.],
[ 2., 3., 6., 15., 4., 4.]])