Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

ReduceByKey takes a key and value and reduction function and reduces into a dictionary in the following way: if key in self.res: self.res[key] = reduction(self.res[key], value) else: self.res[key] = value

...