I am wondering why the list in scala spark can be converted into a
dataframe directly?

scala> val df = List("apple","orange","cherry").toDF("fruit")

*df*: *org.apache.spark.sql.DataFrame* = [fruit: string]


scala> df.show

+------+

| fruit|

+------+

| apple|

|orange|

|cherry|

+------+


I don't think pyspark can convert that as well.


Thank you.

Reply via email to