I was wondering if there was a way to prevent "Top Ten Salaries" from appearing in my output, but I just want just the list. Here is my code:
from mrjob.job import MRJob
class MRWordCount(MRJob):
def mapper(self,_,lines):
for number in lines.split(','):
yield None, int(number)
def reducer(self, _, numbers):
yield "Top Ten Salaries", sorted(numbers,reverse = True)[:10]
if __name__ == '__main__':
MRWordCount.run()
Here is my output:
"Top Ten Salaries" [10,9,8,7,6,5,4,3,2,1]
I do not want to include the text in front of the list. Does anyone know how I would go about this?