title: 'StructType' object has no attribute 'toDDL'
body: <p>I'm running this script with spark 2.4.3 &amp; python 3.6.10</p>
  <pre class="lang-py prettyprint-override"><code>columns = [&quot;language&quot;,&quot;users_count&quot;]
  data = [(&quot;Java&quot;, &quot;20000&quot;), (&quot;Python&quot;, &quot;100000&quot;), (&quot;Scala&quot;, &quot;3000&quot;)]
  spark = SparkSession.builder.appName('SparkByExamples.com').getOrCreate()
  rdd = spark.sparkContext.parallelize(data)
  df = rdd.toDF()
  print(df.schema.toDDL)
  </code></pre>
  <blockquote>
  <p>AttributeError: 'StructType' object has no attribute 'toDDL'</p>
  </blockquote>
  <p><a href="https://spark.apache.org/docs/2.4.3/api/java/org/apache/spark/sql/types/StructType.html#toDDL--" rel="nofollow noreferrer">The java documentation</a> mentions that <code>toDDL</code> function is available from spark 2.4.0, which is not in <a href="https://spark.apache.org/docs/2.4.3/api/python/pyspark.sql.html#module-pyspark.sql.types" rel="nofollow noreferrer">the python documentation</a>.</p>
  <p>Is there any other way to use this java function from python?</p>