title: Error in imputer.fit when preprocessing data
body: <p>Python 3.6.7
  IPython 7.4.0
  Navigator/Spyder</p>
  
  <p>Hi, I'm getting <code>TypeError: '(slice(None, None, None), slice(1, 3, None))' is an invalid key</code> when using this code</p>
  
  <pre><code>#Importing Libraries
  import numpy as np
  import matplotlib.pyplot as plt
  import pandas as pd
  
  #Importing the Dataset
  
  dataset = pd.read_csv("Data.csv")
  
  #Independant &amp; Dependant Variables
  
  X = dataset.iloc[: , :-1]
  Y = dataset.iloc[: , 3]
  
  #Missing Data
  
  from sklearn.impute import SimpleImputer
  imputer = SimpleImputer(missing_values = np.nan, strategy = "mean", 
                          fill_value=None, verbose=0, copy=True)
  imputer = imputer.fit(X[: , 1:3])
  X[:, 1:3] = imputer.transform(X[:, 1:3])
  </code></pre>
  
  <p>The error i get is:</p>
  
  <pre><code>from sklearn.impute import SimpleImputer
  imputer = SimpleImputer(missing_values = np.nan, strategy = "mean", 
                          fill_value=None, verbose=0, copy=True)
  imputer = imputer.fit(X[: , 1:3])
  X[:, 1:3] = imputer.transform(X[:, 1:3])
  Traceback (most recent call last):
  
    File "&lt;ipython-input-4-a1bcee2e6448&gt;", line 4, in &lt;module&gt;
      imputer = imputer.fit(X[: , 1:3])
  
    File "C:\Users\Farouk\Anaconda3\lib\site-packages\pandas\core\frame.py", 
  line 2927, in __getitem__
      indexer = self.columns.get_loc(key)
  
    File "C:\Users\Farouk\Anaconda3\lib\site- 
  </code></pre>
  
  <p>packages\pandas\core\indexes\base.py", line 2657, in get_loc
          return self._engine.get_loc(key)</p>
  
  <pre><code>  File "pandas/_libs/index.pyx", line 108, in 
  pandas._libs.index.IndexEngine.get_loc
  
    File "pandas/_libs/index.pyx", line 110, in 
  pandas._libs.index.IndexEngine.get_loc
  
  TypeError: '(slice(None, None, None), slice(1, 3, None))' is an invalid 
  key
  </code></pre>
  
  <p>Does anyone know why this is happening?</p>