title: Union empty Dataframe with a full dataframe Python
body: <p>I have two <code>Python dataframes</code>, I do a test before filling them, so sometime one of them is empty.</p>
  
  <p>When I did Union of the two dataframes, it returns <code>AttributeError("'DataFrame' object has no attribute 'union'",)</code>, I tried to return the dataframe that is not empty, in this case I got a result.</p>
  
  <p>Structure of my code:</p>
  
  <pre><code>df_result = sqlContext.createDataFrame(sc.emptyRDD(), schema)
  
  Test if of the first datafarme....
  
  Test if of the second dataframe.....
  
  Final result:
  
  df_result=df1.union(df2)
  </code></pre>
  
  <p>How can I do a Union of two Python dataframes, one of them being sometimes empty?</p>