Merge list of lists in pySpark RDD

前端 未结 2 1941
傲寒
傲寒 2021-01-15 17:23

I have lists of tuples that I want to combine into one list. I\'ve been able to process the data using lambdas and list comprehension to where I\'m close to being able to u

2条回答
  •  迷失自我
    2021-01-15 17:35

    You can do,

    test = test.flatMap(identity)
    

    or

    test = test.flatMap(lambda list: list)
    

提交回复
热议问题