pySpark-merge多个dataframe

当需要merge多个spark datafame的时候:

from functools import reduce

buff = []
for pdfs in [pdf1, pdf1,pdf3...]:
      buff.append(pdfs)
mergeDF = reduce(lambda x,y: x.union(y), buff)
posted @ 2020-06-26 16:43  real-zhouyc  阅读(2056)  评论(2编辑  收藏  举报