aggregateBykey() for String using pyspark(CCA175)


#1

Input:[(‘foo’, ‘A’), (‘foo’, ‘A’), (‘foo’, ‘A’), (‘foo’, ‘A’), (‘foo’, ‘B’), (‘bar’, ‘C’), (‘bar’, ‘D’), (‘bar’, ‘D’)]

Output:(foo,(B, A), (bar,(C, D))

Looking for solution using pyspark.TIA