title: Pyspark: TypeError: unionByName() got an unexpected keyword argument 'allowMissingColumns'
body: <p>While using these line of code which is in the documenttion of Pyspark unionByName</p>
  <pre><code>df =spark.createDataFrame(data,columns)
  
  df1 = spark.createDataFrame([[1, 2, 3]], [&quot;col0&quot;, &quot;col1&quot;, &quot;col2&quot;])
  df2 = spark.createDataFrame([[4, 5, 6]], [&quot;col1&quot;, &quot;col2&quot;, &quot;col3&quot;])
  df1.unionByName(df2, allowMissingColumns=True).show()
  </code></pre>
  <p>got this error:</p>
  <pre><code>    unionByName() got an unexpected keyword argument 'allowMissingColumns'
      Traceback (most recent call last):
      TypeError: unionByName() got an unexpected keyword argument 'allowMissingColumns'
  </code></pre>
  <p>Is there any other way to do this, in my code</p>
  <pre><code>   df1: [&quot;col0&quot;, &quot;col1&quot;, &quot;col2&quot;,&quot;col3&quot;]
     df2: [&quot;col1&quot;, &quot;col2&quot;]
  </code></pre>
  <p>I want to union them on <code>[&quot;col1&quot;, &quot;col2&quot;]</code> and expect the <code>col0</code> and <code>col3</code> to be null after <code>union</code>.</p>