title: Copy paste a Naive Bayes example code on vscode but got errors
body: <p>I copied the code from datacamp to try the Naive Bayes classification on my own on python 3.8 . but when run the code the compiler gives this error</p>
  <pre><code>Traceback (most recent call last):
    File &quot;c:\Users\USER\Desktop\DATA MINING\NaiveTest.py&quot;, line 34, in &lt;module&gt;
      model.fit(features,label)
    File &quot;C:\Users\USER\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sklearn\naive_bayes.py&quot;, line 207, in fit
      X, y = self._validate_data(X, y)
    File &quot;C:\Users\USER\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sklearn\base.py&quot;, line 433, in _validate_data
      X, y = check_X_y(X, y, **check_params)
    File &quot;C:\Users\USER\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sklearn\utils\validation.py&quot;, line 63, in inner_f
      return f(*args, **kwargs)
    File &quot;C:\Users\USER\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sklearn\utils\validation.py&quot;, line 814, in check_X_y
      X = check_array(X, accept_sparse=accept_sparse,
    File &quot;C:\Users\USER\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sklearn\utils\validation.py&quot;, line 63, in inner_f
      return f(*args, **kwargs)
    File &quot;C:\Users\USER\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sklearn\utils\validation.py&quot;, line 630, in check_array
      raise ValueError(
  ValueError: Expected 2D array, got scalar array instead:
  array=&lt;zip object at 0x0F2C4C28&gt;.
  Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample.
  </code></pre>
  <p>I am posting the whole code cause I'm not sure which part that causes this so I'm requesting help to solve this.</p>
  <pre><code># Assigning features and label variables
  weather=['Sunny','Sunny','Overcast','Rainy','Rainy','Rainy','Overcast','Sunny','Sunny','Rainy','Sunny','Overcast','Overcast','Rainy']
  temp=['Hot','Hot','Hot','Mild','Cool','Cool','Cool','Mild','Cool','Mild','Mild','Mild','Hot','Mild']
  play=['No','No','Yes','Yes','Yes','No','Yes','No','Yes','Yes','Yes','Yes','Yes','No']
  
  # Import LabelEncoder
  from sklearn import preprocessing
  #creating labelEncoder
  le = preprocessing.LabelEncoder()
  
  # Converting string labels into numbers.
  weather_encoded=le.fit_transform(weather)
  print (weather_encoded)
  temp_encoded=le.fit_transform(temp)
  label=le.fit_transform(play)
  print (&quot;Temp:&quot;,temp_encoded)
  print (&quot;Play:&quot;,label)
  
  
  #Combinig weather and temp into single listof tuples
  features=zip(weather_encoded,temp_encoded)
  print(list(zip(weather_encoded,temp_encoded)))
  print([i for i in zip(weather_encoded,temp_encoded)])
  
  
  from sklearn.naive_bayes import GaussianNB
  #Create a Gaussian Classifier
  model = GaussianNB()
  # Train the model using the training sets
  model.fit(features,label)
  #Predict Output
  predicted= model.predict([[0,2]]) # 0:Overcast, 2:Mild
  print (&quot;Predicted Value:&quot;, predicted)
  </code></pre>
  <p>supposedly the result something like this <code>Predicted Value: [1]</code>
  but it gave this error instead</p>