Dataset¶
Empty¶
val df = Seq.empty[Apple].toDS()
From list¶
List(Apple("green", 70), Apple("red", 110)).toDS()
From DataFrame¶
List(("green", 70)).toDF("color", "weight")
.as[Apple]
Example: DataSetCreationSpec.scala
val df = Seq.empty[Apple].toDS()
List(Apple("green", 70), Apple("red", 110)).toDS()
List(("green", 70)).toDF("color", "weight")
.as[Apple]
Example: DataSetCreationSpec.scala