title: Problem in Code " Could not convert string to float"
body: <p>I am learning the linear regression from a github link "<a href="https://github.com/Anubhav1107/Machine_Learning_A-Z/blob/master/Part%202%20-%20Regression/Section%205%20-%20Multiple%20Linear%20Regression/multiple_linear_regression.py" rel="nofollow noreferrer">https://github.com/Anubhav1107/Machine_Learning_A-Z/blob/master/Part%202%20-%20Regression/Section%205%20-%20Multiple%20Linear%20Regression/multiple_linear_regression.py</a>"</p>
  
  <p>but when I tried making it, this occurs:</p>
  
  <pre><code>ValueError                                Traceback (most recent call last)
  &lt;ipython-input-26-860be404cdc9&gt; in &lt;module&gt;()
        1 sc_y = StandardScaler()
  ----&gt; 2 y_train = sc_y.fit_transform(y_train)
  
  4 frames
  /usr/local/lib/python3.6/dist-packages/numpy/core/numeric.py in asarray(a, dtype, order)
      536 
      537     """
  --&gt; 538     return array(a, dtype, copy=False, order=order)
      539 
      540 
  
  ValueError: could not convert string to float: 'Florida'
  </code></pre>
  
  <p>I am running it on Google Colab, I have already converted the Categorical Features, so I don't understand what the problem is.</p>
  
  <pre><code># Encoding categorical data
  from sklearn.preprocessing import LabelEncoder, OneHotEncoder
  labelencoder = LabelEncoder()
  X[:, 3] = labelencoder.fit_transform(X[:, 3])
  onehotencoder = OneHotEncoder(categorical_features = [3])
  X = onehotencoder.fit_transform(X).toarray()
  
  
  # Splitting the dataset into the Training set and Test set
  
  from sklearn.cross_validation import train_test_split
  X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.2, random_state = 0)
  
  # Feature Scaling
  from sklearn.preprocessing import StandardScaler
  sc_X = StandardScaler()
  X_train = sc_X.fit_transform(X_train)
  X_test = sc_X.transform(X_test)
  sc_y = StandardScaler()
  y_train = sc_y.fit_transform(y_train)
  </code></pre>