1 min read

`Imputer`后$X$少了一列

很有可能某一列是全是NaN,所以自动删除了。 对的,count一下就好了。

其他不想管的问题。


BTW, if I use train_fea_imputed = imp.fit_transform(train_fea), the code works fine, but train_fea_imputed return an array with 1 dimension less than train_fea

修改axis = 1

In [3]: Imputer?
axis : integer, optional (default=0)
    The axis along which to impute.

    - If `axis=0`, then impute along columns.

跟这个问题不想管。