Assume I have this in pyspark:
data = [{"age":1,"count":10},{"age":2,"count":20},{"age":3,"count":30}]
rdd = sc.parallelize( data )
I want to make "count" + 10 if "age" is larger than 2. Like this :
data = [{"age":1,"count":10},{"age":2,"count":20},{"age":3,"count":40}]
How to achieve this?