title: Appending data to an empty dataframe
body: <p>I am creating an empty dataframe and later trying to append another data frame to that. In fact I want to append many dataframes to the initially empty dataframe dynamically depending on number of RDDs coming. </p>
  
  <p>the union() function works fine if I assign the value to another a third dataframe. </p>
  
  <pre><code>val df3=df1.union(df2)
  </code></pre>
  
  <p>But I want to keep appending to the initial dataframe (empty) I created because I want to store all the RDDs in one dataframe. The below code however does not show right counts. It seems that it simply did not append</p>
  
  <pre><code>df1.union(df2)
  
  df1.count() // this shows 0 although df2 has some data and that is shown if I assign to third datafram. 
  </code></pre>
  
  <p>If I do the below (I get reassignment error since df1 is val. And if I change it to var type, I get kafka multithreading not safe error. </p>
  
  <pre><code>df1=d1.union(df2) 
  </code></pre>
  
  <p>Any idea how to add all the dynamically created dataframes to one initially created data frame?</p>