![]() |
VOOZH | about |
In this article, we will discuss how to create Pyspark dataframe from multiple lists.
zip(list1,list2,., list n)
dataframe = spark.createDataFrame(data, columns)
Example 1: Python program to create two lists and create the dataframe using these two lists
Output:
👁 ImageExample 2: Python program to create 4 lists and create the dataframe