createDataFrame() failing, can't figure out why
<p>I'm trying to create a dataframe using what seems to be the canonical "hello world" of creating spark dataframes and cannot fathom why its failing. Help!</p>

<pre><code>from pyspark.sql.types import *
schema = StructType([StructField("product", StringType(), True)])
l = [('foo')]
rdd = sc.parallelize(l)
df = sqlContext.createDataFrame(rdd, schema)
df.show()
</code></pre>

<p>Above code throws below error</p>

<pre><code>ValueError: Unexpected tuple 'foo' with StructType`
</code></pre>

<p>The code is basically lifted straight out of <a href="https://spark.apache.org/docs/1.6.2/api/python/pyspark.sql.html#" rel="nofollow noreferrer">pyspark.sql module</a> so i am completely stumped.</p>