Scala, Mllib, Machine Learning, Linear Regression, Spark.
columnNames = data.columns //get first row of data val firstRow = data.head(1)(0) //loop through columns and print the data for each column on first //row for(i <- Range(1, columnNames.length)){ println(s"Column: ${columnNames(i)} | Data: ${firstRow(i)}") } /* Column: Avatar | Data: Violet Column: