title: TypeError: argument must be a string or number
body: <p>I'm using the code below:</p>
  
  <pre class="lang-py prettyprint-override"><code>cat_cols = ['MSZoning','Alley','LotShape','LandContour','Utilities','LotConfig','LandSlope','Neighborhood','Condition1','Condition2','BldgType','HouseStyle','RoofStyle','RoofMatl','Exterior1st','Exterior2nd','MasVnrType','ExterQual','ExterCond','Foundation','BsmtQual','BsmtCond','BsmtExposure','BsmtFinType1','BsmtFinType2','Heating','HeatingQC','CentralAir','Electrical','KitchenQual','Functional','FireplaceQu','GarageType','GarageFinish','GarageQual','GarageCond','PavedDrive','PoolQC','Fence','MiscFeature','SaleType','SaleCondition']
  
  from sklearn.preprocessing import LabelEncoder
  le=LabelEncoder()
  
  for col in cat_cols:
      if col in dataset_train.columns:
          i = dataset_train.columns.get_loc(col)
          dataset_train.iloc[:,i] =le.fit_transform(dataset_train.iloc[:,i])
  </code></pre>
  
  <hr>
  
  <p>It gives an error as shown below:</p>
  
  <blockquote>
    <p>TypeError: argument must be a string or number</p>
  </blockquote>