title: Getting value error when doing scaler.fit_transform(X_train)
body: <p>I'm new to machine learning and trying to do a hands-on with scikit-learn on a simple classification problem use case i.e. based on name and nationality, the system should suggest whether the Gender should be 1 or 2. The data I have is:</p>
  
  <pre><code>&lt;br&gt;
  Name    Nationality Gender&lt;br&gt;
  John    201           1&lt;br&gt;
  Sue     401           2&lt;br&gt;
  Smith   401           1&lt;br&gt;
  .... Millions of rows (but to start I'm just picking 5000 records)
  &lt;br&gt;
  </code></pre>
  
  <p>I'm getting the error 'ValueError: could not convert string to float: 'John'' while doing 'X_train = scaler.fit_transform(X_train)'
  I know it is a very common problem and that algorithms work on numbers and not text. I've tried to go through a number of posts and have found people recommending LabelEncoder or One Hot Encoder, but not able to understand how it will fit here and get simple lines of code that would resolve this. Help appreciated.</p>
  
  <pre><code>import sklearn
  import pandas as pd
  from sklearn.model_selection import train_test_split
  
  data=pd.read_csv("D:\profile_gender_data.csv")
  
  feature_names = ['FIRST_NAME_EN', 'PRS_NATIONALITY_ID']
  X = data[feature_names]
  y = data['GENDER_ID']
  
  X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=0)
  from sklearn.preprocessing import MinMaxScaler
  scaler = MinMaxScaler()
  X_train = scaler.fit_transform(X_train)
  X_test = scaler.transform(X_test)
  </code></pre>
  
  <p>Error: ValueError: could not convert string to float: 'John'</p>