title: Create Spark DataFrame. Can not infer schema for type
body: <p>Could someone help me solve this problem I have with Spark DataFrame?</p>
  
  <p>When I do <code>myFloatRDD.toDF()</code> I get an error: </p>
  
  <blockquote>
    <p>TypeError: Can not infer schema for type: type 'float' </p>
  </blockquote>
  
  <p>I don't understand why...</p>
  
  <p>Example:</p>
  
  <pre><code>myFloatRdd = sc.parallelize([1.0,2.0,3.0])
  df = myFloatRdd.toDF()
  </code></pre>
  
  <p>Thanks</p>