Reshaping Data with Pivot in Apache Spark - The Databricks Blog