title: TypeError: __init__() got an unexpected keyword argument 'categorical_features' Google colab
body: <p>Google colab</p>
  <p>This is code for Encoding categorical data</p>
  <pre><code>from sklearn.preprocessing import LabelEncoder, OneHotEncoder
  labelencoder_X_1 = LabelEncoder()
  X[:, 2] = labelencoder_X_1.fit_transform(X[:, 2]) #For month
  labelencoder_X_2 = LabelEncoder()
  X[:, 3] = labelencoder_X_2.fit_transform(X[:, 3]) #For weekday
  onehotencoder = OneHotEncoder(categorical_features = [2])#dummy variable for month
  X = onehotencoder.fit_transform(X).toarray()
  X = X[:, 1:]
  onehotencoder = OneHotEncoder(categorical_features = [13])#dummy variable for week
  X = onehotencoder.fit_transform(X).toarray()
  X = X[:, 1:]
  </code></pre>
  <p>I am getting this error for this and I am facing following errors here. I have already update all library from anaconda prompt. But can't findout the solution of the problem.</p>
  <pre><code>TypeError                                 Traceback (most recent call last)
  &lt;ipython-input-18-faafd78b922d&gt; in &lt;module&gt;()
        4 labelencoder_X_2 = LabelEncoder()
        5 X[:, 3] = labelencoder_X_2.fit_transform(X[:, 3]) #For weekday
  ----&gt; 6 onehotencoder = OneHotEncoder(categorical_features = [2])#dummy variable for month
        7 X = onehotencoder.fit_transform(X).toarray()
        8 X = X[:, 1:]
  
  TypeError: __init__() got an unexpected keyword argument 'categorical_features'
  </code></pre>