title: Spark Dataframes: How can I change the order of columns in Java/Scala?
body: <p>After joining two dataframes, I find that the column order has changed what I supposed it would be.</p>
  
  <p>Ex: Joining two data frames with columns <code>[b,c,d,e]</code> and <code>[a,b]</code> on <code>b</code> yields a column order of <code>[b,a,c,d,e]</code>. </p>
  
  <p>How can I change the order of the columns (e.g., <code>[a,b,c,d,e]</code>)? 
  I've found ways to do it in Python/R but not Scala or Java. Are there any methods that allow swapping or reordering of dataframe columns?</p>