Looks like reduceByKey() should work here.
Cheers
On Sat, Jul 11, 2015 at 11:02 AM, leonida.gianfagna <
leonida.gianfa...@gmail.com> wrote:
> Thanks a lot oubrik,
>
> I got your point, my consideration is that sum() should be already a
> built-in function for iterators in python.
> Anyway I trie
Thanks a lot oubrik,
I got your point, my consideration is that sum() should be already a
built-in function for iterators in python.
Anyway I tried your approach
def mysum(iter):
count = sum = 0
for item in iter:
count += 1
sum += item
return sum
wordCountsGrouped = wor