title: Error occurs: NaN, infinity or a value too large for dtype('float64')
body: <p>I have a very large dataset I have to train a model. I don't know where is Nan or missing values. The error occurs when svm code starts.</p>
  <pre><code>df = pd.read_csv('Data.txt',delimiter=',')
  df.head() 
  X = df[['a', 'b', 'c']].values   
  Y=df['Label'].values
  
  cv = KFold(n_splits=2, random_state=42, shuffle=False)
  for train_index, test_index in cv.split(X):
      print(&quot;Train Index: &quot;, train_index, &quot;\n&quot;)
      print(&quot;Test Index: &quot;, test_index)
  X_train, X_test, Y_train, Y_test = X[train_index], X[test_index], Y[train_index], Y[test_index]
  
  svm1 = svm.SVC(gamma='scale', probability=True)
  pred = svm1.fit(X_train, Y_train).predict(X_test)
  </code></pre>
  <p>error</p>
  <pre><code> raise ValueError(msg_err.format(type_err, X.dtype))
  ValueError: Input contains NaN, infinity or a value too large for dtype('float64')
  </code></pre>