Filtering RDD Based on condition and extracting matched data in Spark python

微笑、不失礼 提交于 2019-11-28 14:36:13

Instead of filtering the RDD twice, modifying and recombining the resulting RDDs, simply group by id, then map over the values to make any changes you need. If you want to further limit the results based on some criteria, then perform a filter while mapping.

I can't really give you a more precise answer as:

a) It doesn't look like you've really tried to implement this yet, and b) I'm not entirely certain what you want.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!