title: Manually create a pyspark dataframe
body: <p>I am trying to manually create a pyspark dataframe given certain data:</p>
  <pre class="lang-py prettyprint-override"><code>row_in = [(1566429545575348), (40.353977), (-111.701859)]
  rdd = sc.parallelize(row_in)
  schema = StructType(
      [
          StructField(&quot;time_epocs&quot;, DecimalType(), True),
          StructField(&quot;lat&quot;, DecimalType(), True),
          StructField(&quot;long&quot;, DecimalType(), True),
      ]
  )
  df_in_test = spark.createDataFrame(rdd, schema)
  </code></pre>
  <p>This gives an error when I try to display the dataframe, so I am not sure how to do this.</p>
  <p>However, the <a href="https://spark.apache.org/docs/2.4.7/api/python/pyspark.sql.html#pyspark.sql.SQLContext.createDataFrame" rel="nofollow noreferrer">Spark documentation</a> seems to be a bit convoluted to me, and I got similar errors when I tried to follow those instructions.</p>
  <p>Does anyone know how to do this?</p>