title: StructType can not accept object float in pyspark
body: <p>Why this is working just fine</p>
  
  <pre><code>from pyspark.sql.types import *
  l=[("foo",83.33)]
  schema = StructType([
     StructField("type", StringType(), True),
     StructField("value", DoubleType(), True)])
  df= spark.createDataFrame(l,schema)
  </code></pre>
  
  <p>And this</p>
  
  <pre><code> l=[(83.33)]
      schema = StructType([
      StructField("value", DoubleType(), True)])
      df= spark.createDataFrame(l,schema)
  </code></pre>
  
  <p>Gives me an error</p>
  
  <pre><code>StructType can not accept object 83.33 in type &lt;class 'float'&gt;
  </code></pre>