title: SciKitlearn ColumnTransformer TypeError: Cannot clone object. You should provide an instance of scikit-learn estimator instead of a class
body: <p>Attempting to work with something that looks a little like this:</p>
  
  <pre><code>  CATEGORY | NUMBER VALUE  | ID
  
     FRUIT   |      15       |  XCD
  
    VEGGIES  |      12       |  ZYK
  
  
  
  from sklearn.preprocessing import LabelEncoder, OneHotEncoder
  data = data.iloc[:,:].values
  enc = LabelEncoder()
  data[:,0]=enc .fit_transform(data[:,0])
  data
  </code></pre>
  
  <h2><strong>Output:</strong></h2>
  
  <pre><code>array([[1, 15, 'XCD'],
         [2, 12, 'ZYK']])
  </code></pre>
  
  <hr>
  
  <p><strong>Then...</strong></p>
  
  <pre><code>from sklearn.compose import ColumnTransformer
  ct = ColumnTransformer(transformers=[('encode',OneHotEncoder,[0])],remainder='passthrough')
  dataset = np.array(ct.fit_transform(data))
  </code></pre>
  
  <p>gives</p>
  
  <pre><code>TypeError: Cannot clone object. You should provide an instance of scikit-learn estimator instead of a class.
  </code></pre>