I am starting to use Spark DataFrames and I need to be able to pivot the data to create multiple columns out of 1 column with multiple rows. There is built in functionality
A pivot operator has been added to the Spark dataframe API, and is part of Spark 1.6.
See https://github.com/apache/spark/pull/7841 for details.