如何从PyPpark输出中删除不需要的东西,如(),[],单引号

时间:2016-01-22 10:21:45

标签: apache-spark pyspark

嗨,我是Spark新手,基于键加入了两个RDD,我得到了以下输出,我想用spark重新格式化,

 (676747, (['India', 'Telemart', 'North', 'South', 'Region', 'Area', 'States', '1C-iim'], ((0.0, 'North', 17), (0.0, 'South', 22), (1.0, 'East', 21), (3.0, 'west', 9.0), (7.0, 'MAH', 8.0, (3.0, 'AKL', 9.0), (23.0, 'PNB', 67))))

所以我想删除所有括号并想要干净的输出,如

676747,India,Telemart,North,South,Region,Area,States,1C-iim,0.0,North,17,0.0,South,22,1.0,East,21 ......

请帮助我达到预期的效果。

0 个答案:

没有答案