access_time 2 years ago languageEnglish
PySpark: Convert Python Array/List to Spark Data Frame
visibility 44,183 comment 0
In Spark, SparkContext.parallelize function can be used to convert Python list to RDD and then RDD can be converted to DataFrame object. The following sample code is based on Spark 2.x. In this page, I am going to show you how to convert the following list to a data frame: data = [('Category A' ...
info Last modified by Administrator 9 months ago
No comments yet.