标签:spark value pre apach data cal 创建 简单 pac
scala> val df = sc.parallelize(Seq( | (0,"cat26",30.9), | (1,"cat67",28.5), | (2,"cat56",39.6), | (3,"cat8",35.6))).toDF("Hour", "Category", "Value") df: org.apache.spark.sql.DataFrame = [Hour: int, Category: string ... 1 more field] scala> df.show +----+--------+-----+ |Hour|Category|Value| +----+--------+-----+ | 0| cat26| 30.9| | 1| cat67| 28.5| | 2| cat56| 39.6| | 3| cat8| 35.6| +----+--------+-----+
标签:spark value pre apach data cal 创建 简单 pac
原文地址:https://www.cnblogs.com/v5captain/p/14208567.html