After joining two dataframes, I find that the column order has changed what I supposed it would be.
Ex: Joining two data frames with columns [b,c,d,e]
and [a,b]
on b
yields a column order of [b,a,c,d,e]
.
How can I change the order of the columns (e.g., [a,b,c,d,e]
)?
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?