title: Random Forest using pyspark.ml for Dataframes
body: <p>I am trying to build a random forest classifier using pyspark.ml library for dataframes (<strong>not mllib for RDD</strong>).
  Do I have to use pipeline as given in the documentation?
  I just want to construct a simple model,</p>
  
  <pre><code>rf = RandomForestClassifier(labelCol = labs, featuresCol = rawdata) 
  </code></pre>
  
  <p>I run into the following error</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "/usr/lib/spark/python/pyspark/__init__.py", line 104, in wrapper
      return func(self, **kwargs)
    File "/usr/lib/spark/python/pyspark/ml/classification.py", line 910, in __init
  __
      self.setParams(**kwargs)
    File "/usr/lib/spark/python/pyspark/__init__.py", line 104, in wrapper
      return func(self, **kwargs)
    File "/usr/lib/spark/python/pyspark/ml/classification.py", line 928, in setPar
  ams
      return self._set(**kwargs)
    File "/usr/lib/spark/python/pyspark/ml/param/__init__.py", line 421, in _set
      raise TypeError('Invalid param value given for param "%s". %s' % (p.name, e)
  )
  TypeError: Invalid param value given for param "labelCol". Could not convert &lt;cl
  ass 'pyspark.sql.dataframe.DataFrame'&gt; to string type
  </code></pre>
  
  <p>A sample of my labels</p>
  
  <pre><code>+---+
  | _2|
  +---+
  |0.0|
  |1.0|
  |0.0|
  |0.0|
  |0.0|
  |0.0|
  |1.0|
  |1.0|
  |1.0|
  |0.0|
  |0.0|
  |0.0|
  |0.0|
  |0.0|
  |0.0|
  |0.0|
  |0.0|
  |0.0|
  |1.0|
  |1.0|
  +---+
  </code></pre>
  
  <p>My data is similar with 180 columns.</p>