title: Does SimpleImputer remove features?
body: <p>I have a dataset of 284 features I am trying to impute using scikit-learn, however I get an error where the number of features changes to 283:</p>
  
  <pre><code>imputer = SimpleImputer(missing_values = np.nan, strategy = "mean")
  imputer = imputer.fit(data.iloc[:,0:284])
  df[:,0:284] = imputer.transform(df[:,0:284])
  X = MinMaxScaler().fit_transform(df)
  
  ---------------------------------------------------------------------------
  ValueError                                Traceback (most recent call last)
  &lt;ipython-input-150-849be5be8fcb&gt; in &lt;module&gt;
        1 imputer = SimpleImputer(missing_values = np.nan, strategy = "mean")
        2 imputer = imputer.fit(data.iloc[:,0:284])
  ----&gt; 3 df[:,0:284] = imputer.transform(df[:,0:284])
        4 X = MinMaxScaler().fit_transform(df)
  
  ~\Anaconda3\envs\environment\lib\site-packages\sklearn\impute\_base.py in transform(self, X)
      411         if X.shape[1] != statistics.shape[0]:
      412             raise ValueError("X has %d features per sample, expected %d"
  --&gt; 413                              % (X.shape[1], self.statistics_.shape[0]))
      414 
      415         # Delete the invalid columns if strategy is not constant
  
  ValueError: X has 283 features per sample, expected 284
  </code></pre>
  
  <p>I don't understand how this is reaching 283 features, I assume on fitting it's finding features that have all 0s or something and deciding to drop that, but I can't find documentation which tells me how to make sure those features are still kept. I am not a programmer so not sure if I am missing something else that's obvious or if I'm better looking into another method? </p>