title: Python: ValueError: could not convert string to float: 'D'
body: <p>I am loading a train.csv file to fit it with a RandomForestClassifier.
  The load and processing of the .csv file happens fine.I am able to play around with my dataframe.</p>
  
  <p>When I try:</p>
  
  <pre><code>from sklearn.ensemble import RandomForestClassifier
  rf = RandomForestClassifier(n_estimators=150, min_samples_split=2, n_jobs=-1)
  rf.fit(train, target)
  </code></pre>
  
  <p>I get this:</p>
  
  <pre><code>ValueError: could not convert string to float: 'D'
  </code></pre>
  
  <p>I have tried:</p>
  
  <pre><code>train=train.astype(float)
  </code></pre>
  
  <p>Replacing all 'D' with another value.</p>
  
  <pre><code>train.convert_objects(convert_numeric=True)
  </code></pre>
  
  <p>But the issue still persists.</p>
  
  <p>I also tried printing all the valueErrors in my csv file, but cannot find a reference to 'D'.</p>
  
  <p>This is my trace:</p>
  
  <pre><code>---------------------------------------------------------------------------
  ValueError                                Traceback (most recent call last)
  &lt;ipython-input-20-9d8e309c06b6&gt; in &lt;module&gt;()
  ----&gt; 1 rf.fit(train, target)
  
  \Anaconda3\lib\site-packages\sklearn\ensemble\forest.py in fit(self, X, y, sample_weight)
      222 
      223         # Convert data
  --&gt; 224         X, = check_arrays(X, dtype=DTYPE, sparse_format="dense")
      225 
      226         # Remap output
  
  \Anaconda3\lib\site-packages\sklearn\utils\validation.py in check_arrays(*arrays, **options)
      279                     array = np.ascontiguousarray(array, dtype=dtype)
      280                 else:
  --&gt; 281                     array = np.asarray(array, dtype=dtype)
      282                 if not allow_nans:
      283                     _assert_all_finite(array)
  
  \Anaconda3\lib\site-packages\numpy\core\numeric.py in asarray(a, dtype, order)
      460 
      461     """
  --&gt; 462     return array(a, dtype, copy=False, order=order)
      463 
      464 def asanyarray(a, dtype=None, order=None):
  
  ValueError: could not convert string to float: 'D'
  </code></pre>
  
  <p>How should I approach this problem?</p>