title: Scikit Learn - ValueError: Array contains NaN or infinity
body: <p>There are no NaNs in my dataset, I have checked thoroughly.  Any reason why I keep getting this error when trying to fit my classifier?  Some of the numbers in the data set are rather large and some decimal places go out 10 decimal points but I wouldn't thing that should cause an error. I included some of my pandas DataFrame info below as well as the error itself. Any ideas? </p>
  
  <pre><code>&lt;class 'pandas.core.frame.DataFrame'&gt;
  DatetimeIndex: 6244 entries, 1985-02-06 00:00:00 to 2009-11-05 00:00:00
  Data columns (total 86 columns):
  
  dtypes: float64(86)
  
  
  
  clf = RandomForestClassifier(n_estimators=100,min_samples_split=4)
  clf.fit(train, train_target)
  
  
  
  ---------------------------------------------------------------------------
  ValueError                                Traceback (most recent call last)
  &lt;ipython-input-150-fa4acb362bc6&gt; in &lt;module&gt;()
        1 clf = RandomForestClassifier(n_estimators=100,min_samples_split=4)
  ----&gt; 2 clf.fit(train, train_target)
        3 clf.score(test, test_target)
  
  C:\Anaconda\lib\site-packages\sklearn\ensemble\forest.pyc in fit(self, X, y, sample_weight)
      255         # Convert data
      256         X, = check_arrays(X, dtype=DTYPE, sparse_format="dense",
  --&gt; 257                           check_ccontiguous=True)
      258 
      259         # Remap output
  
  C:\Anaconda\lib\site-packages\sklearn\utils\validation.pyc in check_arrays(*arrays, **options)
      231                 else:
      232                     array = np.asarray(array, dtype=dtype)
  --&gt; 233                 _assert_all_finite(array)
      234 
      235         if copy and array is array_orig:
  
  C:\Anaconda\lib\site-packages\sklearn\utils\validation.pyc in _assert_all_finite(X)
       25     if (X.dtype.char in np.typecodes['AllFloat'] and not np.isfinite(X.sum())
       26             and not np.isfinite(X).all()):
  ---&gt; 27         raise ValueError("Array contains NaN or infinity.")
       28 
       29 
  
  ValueError: Array contains NaN or infinity.
  </code></pre>