Я предполагаю, что у вас есть СДР таких объектов. Поэтому, если весь размещенный вами объект является одним объектом в СДР, я предлагаю следующее решение:
from collections import Counter
rdd1 = sc.parallelize([('William Hardin',
(['Certified Refurbished Amazon Fire TV (Previous Generation - 1st)',
'Certified Refurbished Amazon Fire TV (Previous Generation - 1st)',
'Certified Refurbished Amazon Fire TV (Previous Generation - 1st)',
'Certified Refurbished Amazon Fire TV (Previous Generation - 1st)',
'Certified Refurbished Amazon Fire TV (Previous Generation - 1st)',
'Amazon Fire TV',
'Amazon Fire TV',
'Fire HD 6 Tablet',
'Fire HD 6 Tablet',
'Fire HD 6 Tablet'],
10))])
rdd2 = rdd1.map(lambda x: (x[0], (dict(Counter(x[1][0])), x[1][1])))
Вывод:
>>> rdd1.map(lambda x: (x[0], dict(Counter(x[1][0])), x[1][1])).take(1)
# [('William Hardin', ({'Certified Refurbished Amazon Fire TV (Previous Generation - 1st)': 5, 'Amazon Fire TV': 2, 'Fire HD 6 Tablet': 3}, 10))]