I\'m trying to take a hardcoded String and turn it into a 1-row Spark DataFrame (with a single column of type StringType) such that:
StringType
String fizz
Try:
sqlContext.sparkContext.parallelize(rawData).toDF()
In 2.0 you can:
import spark.implicits._ rawData.toDF
Optionally provide a sequence of names for toDF:
toDF
sqlContext.sparkContext.parallelize(rawData).toDF("fizz")